Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
HI,
I am trying to implement below M query, however gets the error message "Token 'Then' expected", can somebody help me here
if Text.Contains([Manager],"On Leave") AND [Grandparent]="" THEN "Error" ELSE"No Error"
Solved! Go to Solution.
Hi @guna_knp ,
I beleive that the "then" and the "else" need to be lower case. Try that and let us know.
Proud to be a Datanaut!
Private message me for consulting or training needs.
@guna_knp M code is case sensitive. For your case, you have to use all lower case for "AND", "THEN", "ELSE".
Check here for list of operators
Hope this help.
If this answered your question, please accept this as a solution!!
@guna_knp M code is case sensitive. For your case, you have to use all lower case for "AND", "THEN", "ELSE".
Check here for list of operators
Hope this help.
If this answered your question, please accept this as a solution!!
Hi @guna_knp ,
I beleive that the "then" and the "else" need to be lower case. Try that and let us know.
Proud to be a Datanaut!
Private message me for consulting or training needs.