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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikBeginner1
Creator
Creator

Firstsortedvalue 2

Hi,

I have a KPI which shows the top value by GWP.

FirstSortedValue({<Trade-={'-'}>}Trade, -Aggr(sum(GrossWrittenPremium), Trade))

I have been trying to figure out how to set the second highest value. I have tried many different ways looking online but the output keeps coming through as blank.

Any suggestions?

Thanks

Labels (3)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try passing third rank parameter with distinct qualifier, like:

FirstSortedValue(Distinct {<Trade-={'-'}>}Trade, -Aggr(sum(GrossWrittenPremium), Trade), 2)

View solution in original post

2 Replies
tresesco
MVP
MVP

Try passing third rank parameter with distinct qualifier, like:

FirstSortedValue(Distinct {<Trade-={'-'}>}Trade, -Aggr(sum(GrossWrittenPremium), Trade), 2)

QlikBeginner1
Creator
Creator
Author

Thanks Tresesco!! 🙂