Forum Discussion

Mahi1989's avatar
Mahi1989
Frequent Visitor
8 years ago
Solved

Compare a value from two column and get matching value from another table Power BI

Hi All   As i am fairly new to powerbi need your help in one task on which i am stuck on. basically i have two tables and i need to compare the value from table one with a row of table 2 and retur...
  • Ashish_Mathur's avatar
    8 years ago

    Hi,

     

    In the Query Editor, right click on the first column in Table2 and select "Unpivot other columns".  This will convert that Table into a 3 column one.  In the Query Editor itself, merge the two tables by connecting the first two columns of Table1 with the first two columns of Table2.

  • Ashish_Mathur's avatar
    Ashish_Mathur
    8 years ago

    Hi,

     

    Once you bring over the Value column from Table2 to Table1, write this calculated column formula in Table1

     

    =if [Column A] ="BY Green" and [Column B]="BS High" and [Value]>=5 then 1 else 0

     

    Hope this helps.