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

How to show max value with corrispondent date?

Hi, I need to show the Max Value of a serie in a KPI element with the corrispondent data.

I tried to calculate the Max Value in the KPI element with the funcio Min(field).

To show the corrispondent date, I tried to write:

if( Min(field), DATE, 'null') but it doesn't show nothing, but I don't understand why.

I tried to use a Text/Image element, but I have the same problem.

Can someone help me? Thanks.

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Min Value:

Min({1<codice_fondo= {'M3'} >} NAV)


Date Associated with Min value

FirstSortedValue(DISTINCT {1<codice_fondo= {'M3'} >} DATA, NAV)

View solution in original post

9 Replies
sunny_talwar

Try using FirstSortedValue

FirstSortedValue(DISTINCT field, -DATE)

Chanty4u
MVP
MVP

try with sunny suggestion

FirstSortedValue(Distnct Field,-Date)

FirstSortedValue - chart function ‒ QlikView

Not applicable
Author

Hi Sunny, thanks for your reply.

I've tried to apply the function you suggested but I don't obtain what I need.
I have write the expression in this way:

FirstSortedValue(distinct {1<codice_fondo= {'M3'} >} NAV, DATA)

The script editor accepts my expression, but I obtain the min value of NAV field, instead the corrispondent DATA vale.

I'm using Set Analysis too because I need NAV values of M3 set.

function.png

What is the mistake?

sunny_talwar

For max, you need to put a negative sign next to you DATA field:

FirstSortedValue(distinct {1<codice_fondo= {'M3'} >} NAV, -DATA)

Chanty4u
MVP
MVP

hi,

FirstSortedValue(distinct {1<codice_fondo= {'M3'} >} NAV, -DATA)



if   DATA ----gives u lowest value


if -DATA ---gives u Maximum value

Not applicable
Author

Thank you, but my request is to show the min value with the corrispondent DATE!

At the moment, with this expression, I obtain only the value of the NAV field.

I need to show the MAX, MIN value of the NAV field and the corrispondent DATE. How can I obtain this?

sunny_talwar

May be this:

Min Value:

Min({1<codice_fondo= {'M3'} >} NAV)


Date Associated with Min value

FirstSortedValue(DISTINCT {1<codice_fondo= {'M3'} >} DATA, NAV)

ramkrishna86
Creator II
Creator II

Use FirstSortedValue to show Max value as per date.

Example:

=FirstSortedValue(Value,-Date)

Not applicable
Author

It works thank you!