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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
liapimentaa
New Member

Cross valiadation between two tables

Hello!

 

I need help 😞

I have two tables. One with data with errors (let's call it table 1) (typos, mostly) and another with the correct information (table 2). I need to make a cross validation between the two tables, and when a value is table 1 is not on table 2, flag it (I tried with conditional formating, but it didn't work). 

Does anyone have any suggestions?

 

 

Thank you in advanced! 🙂

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @liapimentaa ,

If you need to check the upper and lower case of a word's letters, try a merge query in Power query:

vcgaomsft_0-1705634049017.png

then crate a new measure like:

Measure = IF(ISBLANK(COUNT(Table1[Column1.1])),"yellow")

and use it as a background condition:

vcgaomsft_2-1705634167427.png
If you don't need to check the case of letters, you can try this one:

Measure = 
VAR _cur_value = SELECTEDVALUE('Table1'[Column1])
VAR _count = CALCULATE(COUNTROWS('Table2'),'Table2'[Column1]=_cur_value)
VAR _result = IF(ISBLANK(_count),"yellow")
RETURN
_result

vcgaomsft_3-1705634911654.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

View solution in original post

1 REPLY 1
v-cgao-msft
Community Support
Community Support

Hi @liapimentaa ,

If you need to check the upper and lower case of a word's letters, try a merge query in Power query:

vcgaomsft_0-1705634049017.png

then crate a new measure like:

Measure = IF(ISBLANK(COUNT(Table1[Column1.1])),"yellow")

and use it as a background condition:

vcgaomsft_2-1705634167427.png
If you don't need to check the case of letters, you can try this one:

Measure = 
VAR _cur_value = SELECTEDVALUE('Table1'[Column1])
VAR _count = CALCULATE(COUNTROWS('Table2'),'Table2'[Column1]=_cur_value)
VAR _result = IF(ISBLANK(_count),"yellow")
RETURN
_result

vcgaomsft_3-1705634911654.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors
Top Kudoed Authors