Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
guruprem
Partner - Creator III
Partner - Creator III

Logical Help Required

I am Analyzing Weather data. I would like to display max temperature and place where this recorded.

For Max temp I used : Max([Inst Air Temp])  -- Working fine

Question is how to get place of max temp? I tried:  Firstsortedvalue(STATN_ID,-[Inst Air Temp])     - No data displayed

                                                                          Only({$ <[Inst Air Temp] = {$(=Max([Inst Air Temp]))} >} STATN_ID)  -- No data

Please Help to get place where max temp is recorded?

1 Solution

Accepted Solutions
Kushal_Chawda

Have you tried  Firstsortedvalue(distinct STATN_ID,-[Inst Air Temp]) . this statement will look like giving error, but it will work

View solution in original post

5 Replies
Kushal_Chawda

Have you tried  Firstsortedvalue(distinct STATN_ID,-[Inst Air Temp]) . this statement will look like giving error, but it will work

sibideepak
Creator II
Creator II

How do you want to show in front end means which object you're using ..if you are using any charts, dimension may be your problem.

tresesco
MVP
MVP

Firstsortedvalue() should work. Are you trying in a chart/textbox? If there are multiple places with max temp, you might try like:

Firstsortedvalue(Distinct STATN_ID,-[Inst Air Temp])

You would get a syntax warning in red, ignore that.

sibideepak
Creator II
Creator II

It will work for sure..

FirstSortedValue( STATN_ID,-Aggr(Max([Inst Air Temp]),STATN_ID))

Not applicable

If you want it in a chart, then

Dimension -> STATN_ID

Expression -> Only({<[Inst Air Temp]={$(#=Max(TOTAL [Inst Air Temp]))}>}[Inst Air Temp])


If there are multiple places with same temperature which is maximum, then FirstSortedValue() will display only one among those in text box.

Regards,

KKR