Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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 .

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Show text value for latest date

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

3 Replies
MVP
MVP

Re: Show text value for latest date

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

Re: Show text value for latest date

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

Re: Show text value for latest date

And now I will answer myself

FirstSortedValue(Value,-Date,2)