'RANKX showing double numbers and skipping series
I have been trying to rank 2 columns using a calculated column however, i can't seem to make it work properly. I'm new to Power BI so I'm not really sure if I'm missing something. I'm suspecting it has something to do with my filters, but even without the filters, RANKX is still not working properly.
I created a new table
rankingYear =
SUMMARIZE(
responses,
responses[Year],
responses[Name],
"Positive", SUM(responses[Positive]),
"Passive", SUM(responses[Passive]),
"Negative", SUM(responses[Negative]),
"Responses", SUM(responses[Responses]),
"Score", IFERROR(((SUM(responses[Positive])/SUM(responses[Responses]))-(SUM(responses[Negative])/SUM(responses[Responses])))*100,0)
)
Then I transposed it into a Table Visualization, then I added some filters to hide empty Names, Year is 2022,and Responses must be more than 4
Then I created a Ranker column which I would use for RANKX later:
Ranker =
VAR MaxResponse = MAX(rankingYear[Responses])
VAR Result =
(rankingYear[Score] * MaxResponse) + rankingYear[Responses]
RETURN
Result
And then I created the Rank Column:
Rank = RANKX(ALLSELECTED(rankingYear),rankingYear[Ranker],,DESC,Dense)
However, it will not show a proper series. It doubles up and skips some numbers:
I'm adding a link to my sample data here: Sample Data
Hoping someone can help me figure this one out. Thank you!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

