Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik Insider: SaaS capabilities for Data Integration and Analytics, May 25th! Register Now
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!! 🙂