Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello folks need little help!
I need some help on ranking, have expression charges.
I have dimensions product, tin , Want to create rank field based on dimensions selected.
If product and Tin are selected below is ranking.
product | Tin | charges | rank |
P1 | T1 | 1000 | 5 |
P1 | T2 | 200 | 4 |
P1 | T3 | 100 | 3 |
P2 | T1 | 20 | 2 |
P2 | T2 | 10 | 1 |
If product is selected below is ranking.
product | sales | rank | |
p1 | 1300 | 2 | |
p2 | 30 | 1 |
If Tin is selected below is ranking.
Tin | sales | rank | |
T1 | 1020 | 3 | |
T2 | 210 | 2 | |
T3 | 100 | 1 |
Can someone give me some insight
The total keyword makes the function "ignore dimensions". Without it, the rank will return 1 on each row.
This expression should work in all cases:
rank(total -sum(charges))
I have tested it in all of the various ways, and it looks to work as you want:
Thanks You Nicole for you time, I will test it out. I am not familiar how total is computed. Can you explain in short how Total is computed.
rank(total -sum(charges))
The total keyword makes the function "ignore dimensions". Without it, the rank will return 1 on each row.