Forum Discussion
Bansi008
2 years agoHelper III
Need help in conditional statement.
Hi there, In new custom column i wanted to write syntax as if column [sec_name] contains ABC corp 1 then populate ABC else NA. can someone please help me with syntax which will work in PowerBI tra...
- Anonymous2 years ago
Hi Bansi008 ,
Thank you for anmolmalviya05 and daircom answer , and I have other suggestions for you:
Below is my table:
I try this expression:
= Table.AddColumn(#"Changed Type", "Custom", each if Text.Contains([sec_name], "ABC corp 1") then "ABC" else "NA")The final output is shown in the following figure:
If this doesn't work, please provide a screenshot of the error
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
2 years agoSuper User
Hi,
In the last argument of the Text.Contains function, specify Comparer.OrdinalIgnoreCase to perform a non case sensitive search. Read here - Text.Contains - PowerQuery M | Microsoft Learn