Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total Rank

Hi All,

can any one help me on the below issue,

I have a Pivot table with Rank and Sales% for Type and Branch, Now I want one extra row that displays  sum of the rank and rank of the sum of the rank[consider lowest value of rank sum as highest rank. ]

ex:   For the first column Branch1 the sum of the rank is 20, For the Branch 2 sum of the rank is 10 ....., Now I want the rank for these values, the value which is having lowest sum value has better rank.

 

PFA.

Regards

John

5 Replies
marcus_sommer

You could use an aggr() function for your Total's like:

if(dimensionality() = 0, sum(aggr(rank(YourExpression), Type)), rank(YourExpression))

- Marcus

Not applicable
Author

Thanks Marcus, I have tried your Expression but No luck.

Regards

John

marcus_sommer

How looked the result from this expression, why it's wrong?

swuehl
MVP
MVP

You already use a total calculation and it seems like you want to add the total rank to your new sum-of-rank (why so?).

It would be more feasible to achieve what you want when the total line can be used for your new calculation.

edit:

Attached a sample for a sum of rank and the rank of it, using the total line for the calculation and omitting the total from the sum.

Not applicable
Author

Hi Swuehl , whatever you said is correct however I can't do like you provided,  it has to so the total line first and then add all the rank column values including with Total value then  need to give horizontal rank for those sum values.

Regards

John