Power BI: compare tables for new data or duplicate
In this article, I will explain how I check for new data by comparing 2 tables but I can use the same process to check for duplicate values. I have those data:
| old data | new data |
![]() |
![]() |
I want to know 2 things: the new problem (PRB5) and the new incident tickets related to the problem (PRB1 with INC002 and PRB4 with INC006). Now, if I don’t care about the relationship between both, go to the “without relationship” section.
With relationship
First, I want to have unique values in a new column since both columns have duplicate so for each table, I will combine the 2 columns with this formula:
[argument1]&"_"&[argument2]
NOTE:
- If you prefer to use the CONCATENATE function, read Power BI: combine words based on criteria
- If with this new column, I still have duplicates, I will add an index column then combine it, to know how to create an index, read Power BI: sort correctly with index/ranking
| old data | new data |
![]() |
![]() |
In the “new data” table, I will create another new column to show new problem tickets but also new incident tickets with this formula:
var value3=IF(ISBLANK(LOOKUPVALUE('table1'[argument1],'table1'[argument1],'table2'[argument1])),"value1")
Return
IF(ISBLANK(value3),IF(ISBLANK(LOOKUPVALUE('table1'[argument2],'table1'[argument2],'table2'[argument2])),"value2"),value3)
This is the final result:
In the other hand, to show duplicate, I will use this formula:
var value3=IF(NOT(ISBLANK(LOOKUPVALUE('table1'[argument2],'table1'[argument2],'table2'[argument2]))),"value1")
Return
IF(ISBLANK(value3),IF(NOT(ISBLANK(LOOKUPVALUE('table1'[argument1],'table1'[argument1],'table2'[argument1]))),"value2"),value3)
If I don’t care about problem and just want to know about incident, use this formula:
IF(ISBLANK(LOOKUPVALUE('table1'[argument2],'table1'[argument2],'table2'[argument2])),"value2")
And for duplicates, just add the NOT function:
IF(NOT(ISBLANK(LOOKUPVALUE('table1'[argument2],'table1'[argument2],'table2'[argument2]))),"value1")
![]() |
![]() |
Without relationship
If I just want to know only the problem or the incident, it is more simple. Both use the same formula:
IF(ISBLANK(LOOKUPVALUE('table1'[argument],'table1'[argument],'table2'[argument])),"value")
![]() |
![]() |
For duplicate, just add the NOT function:
IF(NOT(ISBLANK(LOOKUPVALUE('table1'[argument],'table1'[argument],'table2'[argument]))),"value")
![]() |
![]() |
Interesting Topics
-
Be successfully certified ITIL 4 Managing Professional
Study, study and study, I couldn’t be successfully certified without studying it, if you are interested...
-
Be successfully certified ITIL 4 Strategic Leader
With my ITIL 4 Managing Professional certification (ITIL MP) in the pocket, it was time to go for the...
-
Hide visual and change background color based on selection
Some small tricks to customize the background colour of a text box...
-
Stacked and clustered column chart or double stacked column chart
In excel, I use a lot the combination of clustered and stacked chart...
-
Refresh Power BI
From the Power BI Service, I can set refresh but, for instance, there is no option to do it monthly or each time a change is made...
-
Power BI alerts to be sent by email from an excel file based on condition
I will explain how to send a list of emails from an excel file after creating alerts...
















