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
Boycie92
Resolver I
Resolver I

Direct Query Identify Duplicates

Hi

 

I am wondering if someone can help,

 

I have a column that has duplicate values I want to create a calculated column that will count the 1st one and not the second

 

So first = 1

Any other = 0

 

I have a direct query model and as a result I’m am not able to add an index in the query editor.

 

If I was I would use a calculation like this

DupsID = IF('Reports'[Index]=MAXX(FILTER('Reports','Reports'[UniqueID]=EARLIER('Reports'[UniqueID])),'Leavers Reports'[Index]),"1","0")

 

Is there anyway first on all to add an index using DAX?

 

Also would I then be able to use the above DAX or somthing similar to be able to identify the duplicates?

 

Thanks in advance,

Boycie92

1 REPLY 1
v-huizhn-msft
Employee
Employee

Hi @Boycie92,

If there is any other column in your resource table to identify the first or second row? If you want to add index through, you need to a column which can be compared like the [Avg-Position] column in this case. Otherwise, I can't figure out an feasible solution.

Best Regards,
Angelia

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.

Top Solution Authors