Forum Discussion

PowerBITestingG's avatar
PowerBITestingG
Resolver I
4 years ago
Solved

Rank duplicates

Hi all   So using this DAX  duplicate = CALCULATE(COUNTA(column1),ALLEXCEPT(table,column1))   I can get the duplicated values.    What I am trying to do is to label one of the duplicates as 1...
  • PowerBITestingG's avatar
    PowerBITestingG
    4 years ago

     

    I solved by creating a new calculated column that uses RAND() for breaking ties

     

    rankduplicates =
    RANKX (
        FILTER (
           table,
            table[column1]
                EARLIER ( table[column1] )
        ),
        table[notie] -- Just RAND()
    )