Qlik Community

Qlik Sense App Development

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

abc_18
Contributor

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
Partner
Partner

Re: How to display max of the value name in KPI

Try this:

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

 

View solution in original post

3 Replies
Partner
Partner

Re: How to display max of the value name in KPI

Try this:

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

 

View solution in original post

Partner
Partner

Re: How to display max of the value name in KPI

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
Contributor

Re: How to display max of the value name in KPI

Hi Arthur,

 

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

 

Regards