Forum Discussion
FaisalKarawalla
4 years agoFrequent Visitor
Ranking Based on Two Columns
Hello, Am trying to come up with a logic that will help me in creating a ranking. So the rank depends on two variable percentages (Columns). Lets Say Percentage 1 and Percentage 2. The de...
- Anonymous4 years ago
Hi FaisalKarawalla ,
Please try below steps:
1.Create an auxiliary columnHP_Column = VAR rank_by_kpi = RANKX ( 'Table', 'Table'[KPI Percentage],, DESC ) VAR rank_by_death = RANKX ( 'Table', 'Table'[Death Percentage],, ASC ) VAR ct_rows = COUNTROWS ( 'Table' ) + 1 RETURN rank_by_death + DIVIDE ( rank_by_kpi, ct_rows )2.Rank by the new auxiliary column
Rank_Num = RANKX ( 'Table', 'Table'[HP_Column],, ASC )Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi FaisalKarawalla ,
Please try below steps:
1.Create an auxiliary column
HP_Column =
VAR rank_by_kpi =
RANKX ( 'Table', 'Table'[KPI Percentage],, DESC )
VAR rank_by_death =
RANKX ( 'Table', 'Table'[Death Percentage],, ASC )
VAR ct_rows =
COUNTROWS ( 'Table' ) + 1
RETURN
rank_by_death + DIVIDE ( rank_by_kpi, ct_rows )
2.Rank by the new auxiliary column
Rank_Num =
RANKX ( 'Table', 'Table'[HP_Column],, ASC )
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
FaisalKarawalla
4 years agoFrequent Visitor
Thank you so much!
Works like a charm!