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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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