Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to select top 3 sales person dynamicly?

Hi,

I have a fact table as below:

MonthCustidSales
1A100
1B120
1C80
1D90
2A110
2B100
2C90
2D110

How to show a top 3 person in a gauge dynamicly, in stead of expression of 'sum({<Custid={'B'}>} Sales)','sum({<Custid={'A'}>} Sales)','sum({<Custid={'D'}>} Sales)' in the gauge?

22.jpg

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find attached file for solution.

Regards,

Jagan.

View solution in original post

12 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Please attached file for solution, used variables and set analysis to achieve.

Regards,

Jagan.

Not applicable
Author

I think you can do this by using a calculated dimension so for the top ranked one use

Aggr(if(rank(sum(Sales))=1,Custid),Custid)



jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Try this:

For the first gauge:

Title: 

=FirstSortedValue(CustID, -Aggr(Sum(Sales), CustID), 1)

Expression:

=Sum({<CustID = {"$(=FirstSortedValue(CustID, -Aggr(Sum(Sales), CustID), 1))"}>} Sales)

For the second gauge:

Title: 

=FirstSortedValue(CustID, -Aggr(Sum(Sales), CustID), 2)

Expression:

=Sum({<CustID = {"$(=FirstSortedValue(CustID, -Aggr(Sum(Sales), CustID), 2))"}>} Sales)

For the third gauge:

Title: 

=FirstSortedValue(CustID, -Aggr(Sum(Sales), CustID), 3)

Expression:

=Sum({<CustID = {"$(=FirstSortedValue(CustID, -Aggr(Sum(Sales), CustID), 3))"}>} Sales)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi,

Please check if attached solution works for you.

Not applicable
Author

Thank you very much for everyone.

Not applicable
Author

Hi,

If A AND B are both 220, it will not works, any solutions?

Not applicable
Author

Hi,

If A AND B are both 220, it will not works, any solutions?

Not applicable
Author

Hi,

If A AND B are both 220, it will not works, any solutions?

Not applicable
Author

But if A AND B are both 220, it will not works, any solutions?