Forum Discussion
How to write the multiple IF statement in PowerBI
- 2 years ago
Hi hushpuppies
with "else" between the statements
Take a look at the linked tutorials:
https://www.youtube.com/watch?v=w57a_XheWz4https://www.youtube.com/watch?v=o9qAov3kSN4
According to your example if i understood you correctly it will be like this (you can modify the logic if you need).
1. In the first step I added a column of actual % :
2 And then the custom column :
result:
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- 2 years ago
hushpuppies
Create your remarks column using DAX as follows. You may add >= where necessary based on your scenario.Remark = SWITCH( TRUE(), 'Table07'[Budget] = 0 && 'Table07'[Actual] > 15000, "At Risk", 'Table07'[Actual] >= 'Table07'[Budget] * 0.9, "Issue", 'Table07'[Actual] < 'Table07'[Budget] * 0.9 && 'Table07'[Actual] > 'Table07'[Budget] * 0.75, "At Risk", 'Table07'[Actual] < 'Table07'[Budget] * 0.75, "On Forecast", BLANK() )Result:
Hi hushpuppies
with "else" between the statements
Take a look at the linked tutorials:
https://www.youtube.com/watch?v=w57a_XheWz4
https://www.youtube.com/watch?v=o9qAov3kSN4
According to your example if i understood you correctly it will be like this (you can modify the logic if you need).
1. In the first step I added a column of actual % :
2 And then the custom column :
result:
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly