Forum Discussion

ameera_williams's avatar
ameera_williams
Regular Visitor
5 years ago
Solved

IFS and AND

Hello, i am trying to write the equivalent of an IFS AND statement in Power BI and am strugling.   In Excel, i have written it like this:  =IFS(AND(G2>50%,G2<89%),"At-Risk",G2>90%,"On-Target",G2<=...
  • selimovd's avatar
    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 regards
    Denis