Hi All,
I have 4 levels in my data and a dimension that I should treat as a metric. I also have a numeric metric in my dimension and sum or total is calculated on this metric. The dimension with max value of sum(Metric) should appear in the Dominant_Status column and it should be dynamic. In the sense the dominant dimension will change based on the level of the data selected,
for example if only Level 1 is selected then the metric is summed up and for each Level 1 value, the dominant dimension or the dimension with the maximum value of metric should be dominant dimension for the whole bunch of Level 1 values. Dominant dimension will change based on the calculation of the metric again if the new levels are added(level 2, level 3 or level 4, please refer to the excel file attached.)
I should be able to perform this in Qlik Sense back end code.
Thank you in advance.
Level 1 | Dimension | Metric | Dominant_Dimension |
A | Dim_1 | 847506 | Dim_2 |
A | Dim_2 | 2437732 | Dim_2 |
A | Dim_3 | 818271 | Dim_2 |
A | Dim_4 | 1291719 | Dim_2 |
A | Dim_5 | 2266017 | Dim_2 |
B | Dim_1 | 1955494 | Dim_2 |
B | Dim_2 | 2770021 | Dim_2 |
B | Dim_3 | 1012535 | Dim_2 |
B | Dim_4 | 419855 | Dim_2 |
B | Dim_5 | 1242944 | Dim_2 |
C | Dim_1 | 2444358 | Dim_1 |
C | Dim_2 | 720124 | Dim_1 |
C | Dim_3 | 1371732 | Dim_1 |
C | Dim_4 | 764418 | Dim_1 |
C | Dim_5 | 1786581 | Dim_1 |
D | Dim_1 | 2759685 | Dim_1 |
D | Dim_2 | 836929 | Dim_1 |
D | Dim_3 | 2049795 | Dim_1 |
D | Dim_4 | 2023703 | Dim_1 |
D | Dim_5 | 415765 | Dim_1 |
Thanks,
Monika