Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi community,
Do you know if there is an expression in M code that mimics the IN operator in SQL? I am writting an IF ELSE statement to create a custom column, and would like to not repeat a column name multiple times using OR condition to list values.
Solved! Go to Solution.
Hi,
I found the answer here.
So it should look something like this:
= if List.Contains({125,126,127,128},[Diagnosis_code]) then "Proc1" else if List.Contains({225,226,227,228},[Diagnosis_code]) then "Proc2" else null
Hi,
I found the answer here.
So it should look something like this:
= if List.Contains({125,126,127,128},[Diagnosis_code]) then "Proc1" else if List.Contains({225,226,227,228},[Diagnosis_code]) then "Proc2" else null