Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Trying to get the Rank for a specific values in a dimension, which is aggregated by multiple dimensions in the rows and columns in a pivot table.
Here is the example table and expected pivot table results
Region | Product | Source | Industry | FEE | Bank Name | Year |
India | P1 | A | L1 | 80 | BOA | 2023 |
India | P1 | A | L2 | 88 | City | 2023 |
India | P2 | B | L1 | 23 | SriBank | 2023 |
India | P2 | B | L2 | 36 | HDFC | 2023 |
USA | P1 | A | L1 | 28 | BOA | 2023 |
USA | P1 | A | L2 | 51 | City | 2023 |
USA | P2 | B | L1 | 87 | SriBank | 2023 |
USA | P2 | B | L2 | 26 | HDFC | 2023 |
India | P1 | A | L1 | 20 | BOA | 2024 |
India | P1 | A | L2 | 23 | City | 2024 |
India | P1 | A | L2 | 43 | SriBank | 2024 |
India | P2 | B | L2 | 18 | HDFC | 2024 |
India | P2 | B | L2 | 68 | SriBank | 2024 |
USA | P1 | A | L1 | 30 | BOA | 2024 |
USA | P1 | A | L2 | 35 | City | 2024 |
USA | P2 | B | L1 | 44 | SriBank | 2024 |
USA | P2 | B | L2 | 95 | HDFC | 2024 |
In the Qlike Sense a Pivot table, dimension rows have Region, Source and Industry. Column has Year and Product Dimensions.
Please help me to create a measure expression to get the Rank for the 'SriBank' in the BankName table when the 'SriBank' is compared with all other values in the BankName column, and comparing is based on the Sum of Fee. The Pivot table cell values would be the Rank of 'SriBank' by Rows and Column dimensions and Total aggregated by all the columns.
Below is the expected pivot output
Year | Product | |||||||
2023 | 2024 | |||||||
Region | Source | Industry | 2023 Total | P1 | P2 | 2024 Total | P1 | P2 |
Global | 2 | 0 | 1 | 1 | 3 | 2 | ||
India
|
India Total | 4 | 1 | |||||
A Total | 0 | 2 | 1 | 1 | ||||
L1 | ||||||||
L2 | 1 | |||||||
B Total | 2 | 2 | 1 | 1 | ||||
B | L1 | 1 | 1 | |||||
L2 | 2 | |||||||
USA
|
USA Total | 1 | 2 | |||||
A Total | ||||||||
A | L1 | |||||||
L2 | ||||||||
B Total | 1 | 1 | 2 | 2 | 2 | |||
B | L1 | 1 | 1 | 1 | ||||
L2 |
HI you need work with RANK and AGGR later build pivot
Aggr(Rank(Sum(Fee)),Region,Product).
you can add many dimensions here, rank will be for each gorup
Thanks for the response.
I had tried the suggested expressions, but no luck.
I have been trying very very hard on this since last week. But no luck at all.