Forum Discussion

liapimentaa's avatar
liapimentaa
New Member
2 years ago
Solved

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! 🙂

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi liapimentaa ï¼Œ

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

    then crate a new measure like:

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

    and use it as a background condition:


    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

     

    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

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi liapimentaa ï¼Œ

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

    then crate a new measure like:

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

    and use it as a background condition:


    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

     

    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