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: 
Not applicable

ranking with 2 step sort

Hi!

I have table with fields:

contry, sale, cost

i do:

1. rank customers by sale with some expression (please see additition file) main think: the most bigger customers those get 50% of total sale - rank "A", from 50%-80% - rank "B", from 80%-95% - rank "C", after 95% - rank "D". I use order by Sale desc field to get this.

2. rank customers by profit. I mean (sale / cost -1) (please see additition file) main think: the most bigger customers by (sale / cost -1) expression get 30% sale - rank "3", from 30%-70% - rank "2", after 70% - rank "1". I use order by (sale / cost -1) desc field to get this.

now i need join 2 rank in 1. it will be like:  A3, A2, A1, B3, B2 .... and s.o.

my problem is sorting: if i change sorting field, i lose my rank. May be QV have some order inside dimention { }

please, help if you can

1 Reply
Not applicable
Author

solve it by using macro and variables