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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MITHUN_NAIR
Regular Visitor

Need Help in DAX--Finding Duplicates

 

 

Hello ,

Need your help on this 

  • There are 2 Values in the Index Column i.e. 1 & 2 which indicates that these are coming from two different sources.
    ( I have appended these 2 sources and made a query in a single table which consists of 8 rows)
  • Now I want to create a calculated column where i need to find whether the contract number has duplicates or not between these 2 sources .

for instance Contract number "12" is present in both the sources 1 & 2 --Need to show if the contract Number from source 1 exists in source 2 or not.
if the contract number exists in source 2 then need to restrict this contract number from source 2 else will show the record.

 

MITHUN_NAIR_0-1648710347726.png

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You could create a column like

Has duplicate = 
var indexToCheck = IF( 'Table'[Index] = 1, 2, 1 )
return 'Table'[Contract Number] IN CALCULATETABLE( VALUES('Table'[Contract Number]), REMOVEFILTERS('Table'), 'Table'[Index] = indexToCheck)

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

You could create a column like

Has duplicate = 
var indexToCheck = IF( 'Table'[Index] = 1, 2, 1 )
return 'Table'[Contract Number] IN CALCULATETABLE( VALUES('Table'[Contract Number]), REMOVEFILTERS('Table'), 'Table'[Index] = indexToCheck)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.