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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
haassiej
Helper I
Helper I

IF, VLOOKUP, ISNA -> DAX

Hello all,

 

I have a question about translating an Excel function to Power BI. I've already searched around and came across different DAX solutions, I only get this not working.

 

I would like to apply the Excel formula below to Power BI.

 

= IF ($ N2 = "NO XX"; M2; IF (VLOOKUP ($ Z2; TABLE2! AB: AE; 4; FALSE)); "No Match with XX"; VLOOKUP ($ Z2; TABLE2! AB: AE; 4; FALSE)))

 

The values N2 and M2 are in TABLE1 and if they are not "NO XX" then he will look in TABLE2.

 

Can someone help me on my way?

 

Thanks in advance

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@haassiej,

Create a column using DAX below.

Column = IF(Table1[N]="No XX",Table1[M],IF(ISBLANK(LOOKUPVALUE(Table2[Column4],Table2[Column1],Table1[Z])),"No match with XX",LOOKUPVALUE(Table2[Column4],Table2[Column1],Table1[Z])))

1.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
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

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@haassiej,

Create a column using DAX below.

Column = IF(Table1[N]="No XX",Table1[M],IF(ISBLANK(LOOKUPVALUE(Table2[Column4],Table2[Column1],Table1[Z])),"No match with XX",LOOKUPVALUE(Table2[Column4],Table2[Column1],Table1[Z])))

1.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuezhe-msft

 

Thanks for your reply!

 

Have your columns a join/relationship with each other? My tables in Power BI doesn't have an relationship.

@haassiej,

There is no relationship between the tables in my scenario.

Regards,

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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