Forum Discussion
Power Query Conditional Column
- Mar 11, 2024
Please carefully look at my 1st post. It says/shows "Custom Column", you do "Conditional Column". I suspect this is the reason of your last issue
No idea what you're doing so this might not be the best approach... You can do it this way:
Thanks Lorenzo I tried this;
= if Text.Contains([Column1], "0xB821") or
Text.Contains([Column1], "Physical Cell ID") or
Text.Contains([Column1], "Freq") or
Text.Contains([Column1], "inOneGroup") or
Text.Contains([Column1], "groupPresence") or
Text.Contains([Column1], "ssb-ToMeasure") or
then [Column1] else null
It says:-
Thanks & Regards
Anupam Shrivastava
- LorenzoMar 11, 2024Silver Contributor
You have an extra or before then. Fix:
= if Text.Contains([Column1], "0xB821") or Text.Contains([Column1], "Physical Cell ID") or Text.Contains([Column1], "Freq") or Text.Contains([Column1], "inOneGroup") or Text.Contains([Column1], "groupPresence") or Text.Contains([Column1], "ssb-ToMeasure") then [Column1] else null- anupambit1797Mar 11, 2024Steel Contributor
Thanks Lorenzo ,
after using the one you mentioned(deleting the extra "or"), getting "Expression Error":-
= if Text.Contains([Column1], "0xB821") or
Text.Contains([Column1], "Physical Cell ID") or
Text.Contains([Column1], "Freq") or
Text.Contains([Column1], "inOneGroup") or
Text.Contains([Column1], "groupPresence") or
Text.Contains([Column1], "ssb-ToMeasure")
then [Column1] else nullBr,
Anupam
- LorenzoMar 11, 2024Silver Contributor
Please carefully look at my 1st post. It says/shows "Custom Column", you do "Conditional Column". I suspect this is the reason of your last issue