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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Identify and highlight duplicate rows

Hello everyone,

Whilst I see there are several posts regarding duplicate rows in a table, I can't find the solution to my particular query.

I have 2 tables (TableA and TableB) containing data from JSON files run on 2 different weeks. They contain the same data columns, but taken from the system 1 week apart therefore potentially different values if there has been a change on the system during the week.

I have to highlight what has changed.

I have created a new table TableMERGE whereby rows from TableA and Table B have been combined into one table.

I now need to ignore any rows of data which are identical, and be left with a table of data whereby there is a difference between the 2 weeks.

For example:

AP23_1-1702917333315.png

Tables A and B have been combined together (in Power Query) to make "Table Merge".

I then need to identify the rows of data which are duplicate (excelpt for the customNote column) and remove both rows from the table, leaving me with the last table shown in the above example, whereby only rows of data showing a change are left.

Unfortunately the system API does not have any create/modified by timestamp which would have made things a lot easier! 

 

Any help or suggestions greatly appreciated.

Many thanks. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please try to create a new table with below dax formula:

Table =
VAR tmp =
    UNION ( 'Table 1', 'Table 2' )
VAR tmp1 =
    GROUPBY (
        tmp,
        [Site ID],
        [PersonID],
        [WeekCommencing],
        [Monday],
        [Thursday],
        [Wednesday],
        [Friday],
        "Ctn", COUNTX ( CURRENTGROUP (), [CustomNote] )
    )
VAR tmp2 =
    FILTER ( tmp1, [Ctn] = 1 )
RETURN
    tmp2

vbinbinyumsft_0-1702951916303.png

 

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

This has worked perfectly, thank you so much for your help!! Awesome 🙂

Anonymous
Not applicable

Hi @Anonymous ,

Please try to create a new table with below dax formula:

Table =
VAR tmp =
    UNION ( 'Table 1', 'Table 2' )
VAR tmp1 =
    GROUPBY (
        tmp,
        [Site ID],
        [PersonID],
        [WeekCommencing],
        [Monday],
        [Thursday],
        [Wednesday],
        [Friday],
        "Ctn", COUNTX ( CURRENTGROUP (), [CustomNote] )
    )
VAR tmp2 =
    FILTER ( tmp1, [Ctn] = 1 )
RETURN
    tmp2

vbinbinyumsft_0-1702951916303.png

 

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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