The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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?
Solved! Go to Solution.
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...
and a table called nameTable that looks like...
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...
to end up with...
Proud to be a 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...
and a table called nameTable that looks like...
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...
to end up with...
Proud to be a Super User! | |