Forum Discussion
Adding Ranks?
- 1 year ago
Hi Anonymous
Allways use a common dimention. Attached sample file with the proposed solution.
Anonymous , Try using
Ensure that you have calculated the ranks for both measures correctly. You can use the RANKX function in Power BI to rank your measures.
Industry Per Caps Rank = RANKX(ALL('Table'), 'Table'[Industry Per Caps], , ASC, Dense)
Observed Drinker Rank = RANKX(ALL('Table'), 'Table'[Observed Drinker], , ASC, Dense)
Create the Combined Score: Once you have the ranks, you can create a new measure to sum these ranks.
Consumer Preference Score = [Industry Per Caps Rank] + [Observed Drinker Rank]
Visualize the Combined Score: Add the Consumer Preference Score measure to your visual to see the combined score for each zone.
- Anonymous1 year agoNot applicable
Hi there, thank you so much for your response. So it's a bit tricky because these ranks are built with parameters. See below.
Industry Per Caps Rank =VAR OverallRank =RANKX(ALLSELECTED ('Industry per Caps Rank'),CALCULATE (SUM ('Industry per Caps Rank'[Industry Per Caps])),,DESC,Dense)VAR SubCategoryRank =RANKX (ALLSELECTED ('Industry per Caps Rank'[Sub-Category]),CALCULATE (sum('Industry per Caps Rank'[Industry Per Caps])),,DESC,Dense)VAR ZoneRank =RANKX (ALLSELECTED ('Industry per Caps Rank'[Zone]),CALCULATE (SUM ('Industry per Caps Rank'[Industry Per Caps])),,DESC,Dense)VAR ChannelRank =RANKX (ALLSELECTED ('Industry per Caps Rank'[Channel]),CALCULATE (SUM('Industry per Caps Rank'[Industry Per Caps])),,DESC,Dense)VAR ManufacturerRank =RANKX (ALLSELECTED ('Industry per Caps Rank'[Manufacturer]),CALCULATE(SUM ('Industry per Caps Rank'[Industry Per Caps])),,DESC,DENSE)VAR CategoryRank =RANKX (ALLSELECTED ('Industry per Caps Rank'[Category]),CALCULATE(SUM ('Industry per Caps Rank'[Industry Per Caps])),,DESC,DENSE)RETURNSWITCH (TRUE (),CONTAINSSTRING ( SELECTEDVALUE ('Selection Parameter'[Type]), "Channel" ) , ChannelRank,CONTAINSSTRING ( SELECTEDVALUE ('Selection Parameter'[Type]), "Zone" ), ZoneRank,CONTAINSSTRING (SELECTEDVALUE ( 'Selection Parameter'[Type]), "Sub"), SubCategoryRank,CONTAINSSTRING (SELECTEDVALUE ( 'Selection Parameter'[Type]), "Category"), CategoryRank,CONTAINSSTRING (SELECTEDVALUE ('Selection Parameter'[Type]), "Manufacturer"), ManufacturerRank,OverallRank)