Forum Discussion
IF function when more than one true value
Hello, I have a column in my power BI report that reads 'BA' with 5 data available values. I need to add an if function to read if BA = B and/or G then Data source must equal B. Where BA is anything else e.g O, P, W and blank data source must equal H. Can someone help confirm what the correct formula should read, everytime I try it tells me an error.
create a calculated column as below :
cc =
switch(true(),
tbl_name[BA_Col_name] in {"B","G"} , B , blank() )
let me know if this works
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
2 Replies
- PijushRoyCommunity Champion
- Daniel29195Community Champion
create a calculated column as below :
cc =
switch(true(),
tbl_name[BA_Col_name] in {"B","G"} , B , blank() )
let me know if this works
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠