Forum Discussion

Tlotly's avatar
Tlotly
Icon for Helper V rankHelper V
3 years ago

Breaking a ranking tie

Good day

Please help with breaking a rank tie. 

I have Ranking measure and Variance measure. When I have a tie, like  Disobothla and Taung below; I then want to use Variance as second measure in order to break the tie. Meaning Taung, should be ranked 7 as it has a smaller variance i.e. It is only 9% over budget, as compared to Disobothla which is 11% over budget.  The reason why they are ranking the same is because my Ranking is based on TotalRank which is 3 measures namely; VarianceRank + dropoutRank + PAR%Rank.

 

Also I must mention that all the 3 measures are coming from 3 separate tables and are all linked to Branch details table.

The solutions that I see on the community are not resolving my problem.

 

Below are my measures:

 

1. Ranking: 

IF (
    ISBLANK ([TotalRank]  ) = FALSE (),
    RANKX (
        FILTER (
            ALLSELECTED ( 'Centre details'[Branch Description] ),
            [TotalRank]  <> BLANK ()
        ),
        CALCULATE (
            [TotalRank] ,
            ALLEXCEPT ( 'Centre details', 'Centre details'[Branch Description] )
        ),
        ,
        ASC,
        DENSE
    )
)

2. Variance:

var _groups = sum(Groups[NR of Groups])
            var _budget = sum(Budgets[Budget])
            var _diff =  _groups - _budget
            return IF(ISBLANK([countBranch]), BLANK(),
            divide(_diff, _budget))

 

Thank you in advance

Matlotlo