Forum Discussion
oorf
3 years agoFrequent Visitor
Ranking on bar graph
Hello,
I have used the following Dax formula to create a measure that ranks my top Client Groups by Fail Count per Location
Rank Client Fail Group = IF (
ISINSCOPE( 'Fail List'[Client Groups] ),
RANKX (
CALCULATETABLE (
VALUES ( 'Fail List'[Client Groups] ),
ALLSELECTED ( 'Fail List'[Client Groups] )
),
CALCULATE( SUM('Fail List'[Fail Count]))
)
)
I am trying to translate this into a bar graph so that my y axis has my groups, and the x axis has the count of locations in which it is the top fail similar to this
How can this be done in power bi? Currently it is displaying all 8 locations as having headliner as the top fail.
1 Reply
- powerbi2srmResolver II
Firstly, create a measure with number of fails: SUM('Fail List'[Fail Count]'). Then try with somenthing like this:
Top 10 client groups by fail count = VAR rank_client_group = RANKX( ALL('Fail list'[Client Groups]), [num_fails], [num_fails], DESC, Dense ) VAR top10_rank= IF( rank_client_group<=10, [num_fails], BLANK() ) RETURN top10_rankIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.