Qlik Community

Ask a Question

App Development

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

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
abc_18
Creator II
Creator II

How to display max of the value name in KPI

Hello,

 

I have a set of data like below:-

Sales office
Uttar Pradesh SO
Gujarat SO
Delhi   Haryana SO
Delhi   Haryana SO
Punjab  Himachal SO
Kerala SO
Kerala SO
Punjab  Himachal SO
Punjab  Himachal SO
TAPSO
Uttar Pradesh SO
Uttar Pradesh SO II
Uttar Pradesh SO II
Uttar Pradesh SO II

 

I have to display the name of, max of this sales office in a KPI, where most cases were registered,How to write expression for this?

 

In this example suppose, Uttar Pradesh SO II has max of 4 cases, so it should display 'Uttar Pradesh SO II'.

 

Please suggest.

Labels (2)
1 Solution

Accepted Solutions
Arthur_Fong
Partner
Partner

Try this:

FirstSortedValue([Sales Office],-AGGR(
count([Sales Office])
,[Sales Office]))

 

View solution in original post

3 Replies
Arthur_Fong
Partner
Partner

Try this:

FirstSortedValue([Sales Office],-AGGR(
count([Sales Office])
,[Sales Office]))

 

View solution in original post

Arthur_Fong
Partner
Partner

Your dataset example seems to be missing one record for Uttar Pradesh SO II.

Add in a record for Uttar Pradesh SO II into the inline table and you should get the result.

abc_18
Creator II
Creator II
Author

Hi Arthur,

 

Thank you very much, it's working as expected.

 

Regards