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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
arrrlette
Frequent Visitor

Check if value in one a column of one table is in a column of a different table

All,

 

I am getting the error "The name 'IF' wasnt recognized' on this custom column expression. I am trying to see if the values in [Processor Email] column in Query1 table exist in the "FulfillmentTeamMembers' table (column "ChurchillEmail").

Any ideas?

arrrlette_0-1710958703114.png

 

1 ACCEPTED SOLUTION
jgeddes
Super User
Super User

The if statements in Power Query have a different syntax compared to DAX. There are no parenthesis and lowercase is used. 
DAX =  IF(TEST VALUE, TRUE RESULT, FALSE RESULT)
Power Query  = if TEST VALUE then TRUE RESULT else FALSE RESULT

In your case you may want to use the List.Contains function in your if statement.
An example,

I have a table called emailTable that looks like...

jgeddes_0-1710965882484.png

and a table called nameTable that looks like...

jgeddes_1-1710965928459.png

If I want to create a column in the nameTable that checks the emailTable to see if email exists for each name the function would look like...

jgeddes_2-1710965996257.png

to end up with...

jgeddes_3-1710966038157.png

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
jgeddes
Super User
Super User

The if statements in Power Query have a different syntax compared to DAX. There are no parenthesis and lowercase is used. 
DAX =  IF(TEST VALUE, TRUE RESULT, FALSE RESULT)
Power Query  = if TEST VALUE then TRUE RESULT else FALSE RESULT

In your case you may want to use the List.Contains function in your if statement.
An example,

I have a table called emailTable that looks like...

jgeddes_0-1710965882484.png

and a table called nameTable that looks like...

jgeddes_1-1710965928459.png

If I want to create a column in the nameTable that checks the emailTable to see if email exists for each name the function would look like...

jgeddes_2-1710965996257.png

to end up with...

jgeddes_3-1710966038157.png

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors