Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Shalom1
Contributor
Contributor

Rank grouped by in KPI window

Hello,

I need to present the KPI window with the number of  HAULIER in Haulier Ranking.

I use the measure called [Haulier Ranking].

In the table it's easy: RANK([Haulier Ranking])

Shalom1_0-1694093264054.png

 

But then when I chose one of [Haulier Group] I'd like to see its real number in ranking instead of 1.

Shalom1_1-1694093702606.png

And more important is to create the information:

HAULIER GROUP  XYZ is 17th from 115(total).

I've tried this:

Shalom1_2-1694093851534.png

but most times it shows "1". Just for some of them: "53" or someting else. I dont'understand why.

Please help

 

 

Labels (3)
7 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Shalom Shalom,

In order to get the original ranking, even when selections are made, you should add some Set Analysis, that would disregard these selections. For example, to always disregard all user selections, you can use {1}, like this:

{1} RANK([Haulier Ranking])

To disregard just some of the selections, list those fields that you want to disregard:

{<[Haulier Group]=, F1=, F2=>} RANK([Haulier Ranking])

You may not need to use the AGGR() function, but if you do - make sure to use both the internal and the external aggregations around AGGR(), and to apply the same Set Analysis in both.

To learn more advanced development techniques, including advanced Set Analysis and AGGR(), check out the agenda of the Masters Summit for Qlik - coming soon to Orlando and to Dublin!

Shalom1
Contributor
Contributor
Author

@Oleg_Troyansky 

Here's what I see after applying {1} RANK([Haulier Ranking])

Shalom1_0-1694094916574.png

 

And my second question, I'd like to have this when I choose {Haulier Group] from the filter pane:

Shalom1_1-1694094994253.png

That's why I 'm using this expression:

aggr(distinct rank({<[Haulier Group] = >}[Haulier_Ranking EndLoadDate]), [Haulier Group])

 

 

 

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Shalom,

I'm assuming that [Haulier Ranking] is a Master Measure - correct? In this case, we'd need to look into it, to understand why you are getting the results that you are getting. If it's a field, then you should use any kind of aggregation within the Rank().

Also - what version of Qlik Sense are you using? This syntax become available relatively recently...

In your second formula, you should disregard the selection of Haulier Group outside of the AGGR, and you should enclose AGGR() in any aggregation functions, like sum, min, or even only(). If you don't, then the default aggregation is only(), and by default it uses current selections as a scope, so your set analysis gets ignored. I'd use something like this:

{<[Haulier Group] = >} only(aggr(distinct rank([Haulier_Ranking EndLoadDate]), [Haulier Group]))

or, if it doesn't work with your version of Qlik Sense:

only( {<[Haulier Group] = >}

     aggr({<[Haulier Group] = >}

          rank([Haulier_Ranking EndLoadDate])

     , [Haulier Group])

)

Cheers,

 

 

 

 

 

Shalom1
Contributor
Contributor
Author

Unfortunetaly your solution doesn't show any results 😞

 

Shalom1_0-1694097927015.png

 

Shalom1_1-1694097942527.png

 

result:

Shalom1_2-1694097991361.png

Haulier Ranking Measure is the sum of  the few KPIs calculated using a weighted average:

KPI_1 * 0,33 + KPI_2 * 0,33  + KPI_3 * 0,33 by Haulier Group

 

When I add " {1} " it shows results where volume is 0 for exemple for previous month:

Shalom1_3-1694098653638.png

Above I have chosen one Hulier Group from the list (with the volume of orders 3096)

 

 

 

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Well, now you have 2 preceding set analysis conditions listed one after another - I don't think that could fly. As a minimum, you should unite these into one Set Analysis.

If you want my help on this, you'll need to create a sample app and share it here. Otherwise, you'll need to continue troubleshooting on your end - it's hard for me to keep guessing what might be wrong in your pictures.

Cheers,

Shalom1
Contributor
Contributor
Author

Ok great, I will try to prepare a sample app, how to share it in here?