Forum Discussion
Multiply Rank column with a weight
Hello,
Im new to Power BI and really hoping someone's able to assist with this one. I have a table to multiple contractors and I need to rank them based on multiple measures. These measures have a weight assigned to them. My thought process is that I rank each measure seperately then multiply the rank with the weight and finally add all the weighted values together for the final ranking.
This is the calculation I have put in to rank one of the measures -
IF (
NOT ( ISBLANK ( [Score] ) ),
RANKX (
FILTER ( ALLSELECTED ( 'sandbox contractor_scorecard'[contractor] ), NOT ( ISBLANK ([Score] ) ) ),
[Score]
)
)
The table looks like this
Contractor | Score | Rank | Weight |
A | 80 | 1 | C2*.20 |
B | 70 | 2 | C3*.21 |
C | 50 | 3 |
|
D | 20 | 5 |
|
E | 10 | 7 |
|
F | 15 | 6 |
|
G | 35 | 4 |
|
I need to calculate the weight in column D as Rank multiplied by weight (constant) and it does'nt do this properly.
Thank you.
- Anonymous7 years ago
Thank you. I was creating new column with the calculation. However, once I created a 'measure' that worked fine.
2 Replies
- v-chuncz-msftCommunity Support
Anonymous ,
You may try adding SELECTEDVALUE and SWITCH.
https://community.powerbi.com/t5/Desktop/If-with-Filter/m-p/549475#M258454
- AnonymousNot applicable
Thank you. I was creating new column with the calculation. However, once I created a 'measure' that worked fine.