Forum Discussion
IFS and AND
- 5 years ago
Hey ameera_williams ,
try the following calculated column:
My IFS Column = SWITCH ( TRUE (), myTable[% Completed vs Planned] > 0.5 && myTable[% Completed vs Planned] < 0.89, "At Risk", myTable[% Completed vs Planned] > 0.9, "On Target", myTable[% Completed vs Planned] <= 0.5, "Off Target" )You can check for multiple criteria the best with the combination of SWITCH and TRUE. Check also the following article for that:
https://powerpivotpro.com/2015/03/the-diabolical-genius-of-switch-true/
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.bi
Hey ameera_williams ,
try the following calculated column:
My IFS Column =
SWITCH (
TRUE (),
myTable[% Completed vs Planned] > 0.5 && myTable[% Completed vs Planned] < 0.89, "At Risk",
myTable[% Completed vs Planned] > 0.9, "On Target",
myTable[% Completed vs Planned] <= 0.5, "Off Target"
)
You can check for multiple criteria the best with the combination of SWITCH and TRUE. Check also the following article for that:
https://powerpivotpro.com/2015/03/the-diabolical-genius-of-switch-true/
- ameera_williams5 years agoRegular Visitor
selimovd Actually, if the cell in '% Completed vs Planned' is empty/blank, then i want to return 'tbd'. What would i need to add to the DAX calc to return this?
- selimovd5 years agoMost Valuable Professional
Hey ameera_williams ,
you can just add it to the switch function:
My IFS Column = SWITCH ( TRUE (), myTable[% Completed vs Planned] > 0.5 && myTable[% Completed vs Planned] < 0.89, "At Risk", myTable[% Completed vs Planned] > 0.9, "On Target", myTable[% Completed vs Planned] <= 0.5, "Off Target", myTable[% Completed vs Planned] = "" || myTable[% Completed vs Planned] = BLANK(), "tbd" )If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.bi- ameera_williams5 years agoRegular Visitor
selimovd unfortunately it isn't working, it is saying #Error. I'll see if i can play around with it and fidgure it out.