Forum Discussion

MITHUN_NAIR's avatar
MITHUN_NAIR
Regular Visitor
4 years ago
Solved

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.

 

 

  • 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)

1 Reply

  • 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)