Forum Discussion
Function IF error in add step
- 4 years ago
PQ is super case sensitive.
Following changes are required
1. IF needs to be replaced with if
2. = in Text.Contains needs to be replaced with comma
Hence, in your custom column, you need to input following
= if Text.Contains([#"Format commercial regroupé"],"DIGITAL") then "DOOH" else [#"Type d'activité"] - 4 years ago
IF in power query should be "if" (lowercase) and IF in DAX is uppercase. I appreciate this is confusing, has caught me out a few times too.
The "=" sign won't work as Text.Contains takes in two parameters (seperated by a column). Just replace the "=" with a "," and you'll be all good. Good luck!
- Anonymous4 years ago
Hi Anonymous ,
Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your problem.
Best Regards,
Stephen Tao
IF in power query should be "if" (lowercase) and IF in DAX is uppercase. I appreciate this is confusing, has caught me out a few times too.
The "=" sign won't work as Text.Contains takes in two parameters (seperated by a column). Just replace the "=" with a "," and you'll be all good. Good luck!