Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show text value for latest date

Hello,

I didn't find the answer for my problem on the forum, so I would like to ask for help on that...

I need to display value from maximum (latest) date. I have data as following:

DateValue
2012/12/31Medium
2012/11/30Large
2012/10/31Small

I would like to display 'Medium' in the text box as this is the value for maximum day in the data I have.

If anyone have the idea how to do it, please help me, cause I'm running out of the ideas on my own .

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Try FirstSortedValue() function:

=FirstSortedValue(Value, -Date)

as expression in a textbox. Date should have an unambiguous Value for the latest date, and Date field must have a numeric representation.

Hope this helps,

Stefan

View solution in original post

3 Replies
swuehl
Champion III
Champion III

Try FirstSortedValue() function:

=FirstSortedValue(Value, -Date)

as expression in a textbox. Date should have an unambiguous Value for the latest date, and Date field must have a numeric representation.

Hope this helps,

Stefan

Not applicable
Author

Thank you for a very helpful answer .

Now I have a new problem: how to display text value for latest month -1 (according to the table I have attached: 'Large'). Could you please advise... It's more complicated I think.

Not applicable
Author

And now I will answer myself

FirstSortedValue(Value,-Date,2)