Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Count duplicate values and number them as 1,2,3.

Can any one help me for DAX formula to number the duplicate values as 1,2,3... in the 2nd column

I have tried with this DAX formula in a new column {Double = IF(CALCULATE(COUNT('Rejection'[URN]),FILTER('Rejection','Rejection'[URN]=EARLIER('Rejection'[URN])))>1,1,0)}, but the result is not matched what i have expected.

 

URN-         Duplicate Numbering
---------------------------
1007171-          1
1007172-          1
1007172-          2
1007172-          3
1007175-          1
1007175-          2
1007177-          1

2 ACCEPTED SOLUTIONS

Hi @Anonymous

 

Please see the attached file

 

We need an assitant field/ column to do this numbering.

So first  add a calculated column

 

SupportingColumn =
RANDBETWEEN ( 1, 100 )

Then we can use this formula to get desired Duplicate Numbering

 

Duplicate_Numbering =
RANKX (
    FILTER ( Table1, Table1[URN] = EARLIER ( Table1[URN] ) ),
    Table1[SupportingColumn]
)

Regards
Zubair

Please try my custom visuals

View solution in original post

14 REPLIES 14

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.