Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show which Dimension has Greatest/Max Value

I want to create a table that shows which Well has the greatest daily Depth_Drilled.

WellMax Dly Depth Drilled
SRC 32H3100

I'm able to get the maximum value in the database using the below in my expression tab...

     =Max({1} Total Depth_Drilled)

However, the table lists all wells (i.e., dimension) with that Maximum Depth_Drilled.

WellMax Dly Depth Drilled
Mtn Range 12H3100
Erie Cnty 5H3100
SRC 32H3100
Punxy 10V3100
Durango 7V3100

What is the code to only show the exact well/dimension with the maximum Depth_Drilled?  Also, if I wanted to show which well had the maximum within the last six months what is the code to show that timeframe?

Thanks,

Mindy

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Remove the TOTAL qualifier from your expression and use a dimension limit in your straight table chart properties to show only the top value.

View solution in original post

7 Replies
swuehl
MVP
MVP

Remove the TOTAL qualifier from your expression and use a dimension limit in your straight table chart properties to show only the top value.

Not applicable
Author

Thanks Swuehl, this works but not in the way that I need it. I want this table chart to always show the well with the max depth no matter what other selections are made by the user.

Not applicable
Author

Never mind.  I got it to work as you described for the historical pull.  Thanks.

What about the data pull for the last 6 months?

swuehl
MVP
MVP

Yes, should be taken care of by your use of set identifier {1}

swuehl
MVP
MVP

You haven't told much about the date dimension in your data model, so just guessing.

Try something like

  =Max({1<Date = {">=$(=AddMonths(Today(),-6))"}>} Depth_Drilled)

Not applicable
Author

The date dimension code doesn't work.  It brings me the max depth without taking the 6-month timeframe into consideration.

swuehl
MVP
MVP

It's probably just a matter of formatting or interpreting your dates correctly.

But it's not really a fun game to guess what the problem might be, without knowing anything about your model and data. Why don't you come up with some sample data, best by posting a small sample QV app.

Or just select the last 6 month in your date dimension and then you will get your result (after removing the {1} set identifier).