Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Duplicate records with same ID-using formula

Hi, I have a table like below where I want the id of the duplicate records to be same.   Current Data                                         Sno Name value      1 John 20 2 John ...
  • Eric_Zhang's avatar
    9 years ago

    Another approach in DAX.

     

    RANK_SNO = 
    RANKX (
        'Table',
        CALCULATE (
            MIN ( 'Table'[Sno] ),
            FILTER ( 'Table', EARLIER ( 'Table'[Name] ) = 'Table'[Name] )
        ),
        ,
        ASC,
        DENSE
    )