0
votes

I would like an equals sign to be added after a rank where the same ranking occurs more than once in Power BI (e.g. 1= and 9=).

As in the screenshot below, I have two instances of a ranking of 1 and four instances of a ranking of 9. Could I add a column where 1 has the value "1=" and 9 has the value "9=", with all the others remaining as 2, 3, 4, etc?

The 'Core skills Rank' is a measure which dynamically ranks according to what is selected in the slicer. I have tried various solutions (involving e.g. SUMMARIZE and EARLIER) to calculate where there are more than one of the same rank in the filtered selection but with no success.

Thanks for any help you can give.

enter image description here

1

1 Answers

0
votes

With this structure:

Table

You could try something like this:

Custom Rank = 
VAR _rank = [rank] --RANKX(ALL('Table'[b]),[myMeasure],,DESC,Dense)
VAR _value = [myMeasure]
VAR _rankCount = 
        COUNTROWS(
            FILTER(
                SUMMARIZE(
                    ALL('Table'[b]),
                    [b],
                    "value",[myMeasure]
                ),
                [value]=_value
            )
        )
RETURN 
IF(HASONEVALUE('Table'[b]),
    IF(_rankCount > 1,
    CONCATENATE(CONVERT(_rank,STRING)," ="),
    CONVERT(_rank,STRING)
    )
)