Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Rank Help

Afternoon folks,

I have the below table in my Qlikview app, and I am trying to add a Rank Column to the far left of it. How do I write a rank expression for this table that ranks the data by the success % (high to low), then by # of docs (again high to low) and then by Site Code (A-Z) so that I achieve the visible ranking in the ranking column below:

RankSite CodeSite Name# of DocsFailureSuccessOtherTotalSuccess %
1BB10580105711058100.00%
2JJ1360404100.00%
3CC94026883391297.14%
4AA7097326596225631394.82%
5GG37126142317184.52%
6FF38137201824684.45%
7EE57850188023878.99%
8DD74351189324378.75%
9HH1790000-
10II17200000-

I have googled how to do this but can't actually find the method I'm looking for.

Thanks,

Gareth

12 Replies
sunny_talwar

Can you share the output you are seeing?

Anonymous
Not applicable
Author

It's ok, I solved that particular issue by slightly amending my expression.

Rank(TOTAL

RangeSum(

Count({<[FTMR_P2P_KPI]={"Success"},[Purchase Order Document Type - Code]-={''} >} Distinct [Invoice Number])

/

(Count({<[FTMR_P2P_KPI]={"Failure","Success"},[Purchase Order Document Type - Code]-={''} >} Distinct [Invoice Number])),

Count({<[FTMR_P2P_KPI]={"Failure","Success"},[Purchase Order Document Type - Code]-={''} >} Distinct [Invoice Number])/1E8,

-Rank(TOTAL [BU Cat 10])/1E10))

However, if you look at the attached you will see ranks 288 and 292 should actually be ranks 282 and 283 respectively.

Many thanks,

Gareth

sunny_talwar

Not sure Gareth.... very difficult to say without having a look my friend

You can check the expression we are ranking and try to adjust the weights

RangeSum(

([Success]

/

([Success] + [Failure]))*100000,

Total/1E5,

-Rank(TOTAL [Site Code]/1E10))

Make sure you see this with a lot of 0s after decimal point. Something like this

Capture.PNG