Forum Discussion
Rahul_SC
Helper IV
3 years agoGroup Ranking in Measure, and Bar chart
Hi, I have written dax for group ranking. It is working fine in table. The Ranking is dynamic. If I unselect a value from slicer (carrier name), the ranking gets updated for the selected values....
- 3 years ago
Rahul_SC
I hope this time is correctAllocated_Spend_New = VAR SelectedCarriers = ALLSELECTED ( 'Table'[Carrier] ) RETURN SUMX ( SUMMARIZE ( 'Table', 'Table'[LaneID], 'Table'[Carrier] ), VAR SumValue = [sum] VAR R1 = [Allocation % for R1] VAR R2 = [Allocation % for R2 Value] VAR R3 = [Allocation % for R3 Value] VAR RValue = SWITCH ( RANKX( SelectedCarriers, COALESCE ( [sum], 99999999999 ),, ASC, Dense ), 1, R1, 2, R2, 3, R3 ) RETURN SumValue * RValue )
tamerj1
Community Champion
3 years agoHi Rahul_SC
what should be the result considering the same example?
- Rahul_SC3 years ago
Helper IV
Hi tamerj1 ,
I have the table 1 which is correct. I want to show this data like table 2. But we can see in the column value (Allocated Spend) is not same in both the tables. The table 2 should summarize the value for each carrier but it seems not working.
I would like to show the value like in table 2.
- Rahul_SC3 years ago
Helper IV
To explain fulther my question -
LaneID, Carrier, TotalSimulation is a part of physical table.
allocated spend is a measure. It is calculated on % basis. like
IF([RankMeasure] = 1,[TotalSimulation]*60%,IF([RankMeasure] = 2,[TotalSimulation]*15%,IF([RankMeasure]=3,[TotalSimulation]*20%