Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

duplicate rows found in a table based on one column for different group

Hi , 

             Based on below data , i want to check whether any source (A) policy number  can be found in source (B)

for each date_run group .

 

I need an output like below. here main thing is last two rows for source B having duplicate policy number rows ,that one i did not included in duplicate because that policy number was repeated only  in source B not in B.

please help for solve this problem

1 Reply

  • Hi Anonymous 

     

    The last B rows are same but there is a similar row with source A which needs to change the dulp to Yes not No(Check this).

     

    BTW, try this DAX to add a calculated column:

    dupl = 
    IF (
        MAXX (
            CALCULATETABLE (
                SUMMARIZE ( 'Table', 'Table'[policy], "CSD", DISTINCTCOUNT ( 'Table'[source] ) ),
                REMOVEFILTERS ( 'Table'[source], 'Table'[date_run] )
            ),
            [CSD]
        ) > 1,
        "Yes",
        "No"
    )
    

     

    output:

     

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

    Appreciate your Kudos!! 

    LinkedIn|Twitter|Blog |YouTube