Forum Discussion
How can I add condition in Query using Mcode for multiple columns in one go?
- 1 year ago
Hello Anonymous ,
You can use Power Query in Power BI to add a custom column with the following condition
if [Custom.Data.Column2] = "Date" or [Custom.Data.Column4] in {"Inbound", "Outbound", "FAT Faulty", "Progress"} then "Keep" else null
You can filter the data where this new column contains the value "Keep". This will allow you to filter for rows where either the second column contains "Date" or the fourth column contains any of the desired values.
If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!
Thank You
Dharmendar S
Hello Anonymous ,
You can use Power Query in Power BI to add a custom column with the following condition
if [Custom.Data.Column2] = "Date" or [Custom.Data.Column4] in {"Inbound", "Outbound", "FAT Faulty", "Progress"} then "Keep" else null
You can filter the data where this new column contains the value "Keep". This will allow you to filter for rows where either the second column contains "Date" or the fourth column contains any of the desired values.
If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!
Thank You
Dharmendar S
- Anonymous1 year agoNot applicable
Thanks it helps!