Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
richard_chilvers
Specialist
Specialist

Maximum value over a dimension

Apologies if this question has been answered previously!

My data is as follows:

CodeDateValue
A10/11/201210
A11/11/201212
A16/11/201213
B10/11/201227
C11/11/20126
C13/11/20128
C15/11/201213

I would like a chart over dimension Code, selecting just the single value for each Code with the latest (MAX) date.

ie. A=13, B=27 and C=13 (ultimately, I will be summing all these values).

Advice please

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

=FirstSortedValue(Value, -Date)

as expression (Date should be interpreted as Date with a numeric representation by QV already), using Code as dimension.

View solution in original post

5 Replies
swuehl
MVP
MVP

Try

=FirstSortedValue(Value, -Date)

as expression (Date should be interpreted as Date with a numeric representation by QV already), using Code as dimension.

shree909
Partner - Specialist II
Partner - Specialist II

hi

if u think that maxvalue is  always calculated only for latest date then u can write max(only{<date=${'maxdate'}>} value)

so create a maxdate variable

richard_chilvers
Specialist
Specialist
Author

Thank you !

I have not used that function before

yashcena
Contributor III
Contributor III

Hi Stefan,

I have a similar requirement

This is how my chart looks like now:

Capture3.JPG

I want the chart like this:

Capture4.JPG

With Week also added as a  dimension in the chart (along with resourcename), the firstsortvalue then sorts for each week. So I get the same thing:

Expression: FirstSortedValue([Remaining Hours],date#(Week))

But I get the same chart:

Capture5.JPG

Is there any way to do what I'm looking for?

Thanks,

YASH

swuehl
MVP
MVP

Use Remaining Hours as second dimension and Min(Week) as expression.