Showing results for 
Search instead for 
Did you mean: 
Boycie92 Member

Direct Query Identify Duplicates



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,


v-huizhn-msft Super Contributor
Super Contributor

Re: Direct Query Identify Duplicates

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,

Helpful resources

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Users Online
Currently online: 21 members 765 guests
Please welcome our newest community members: