Forum Discussion

FatBlackCat30's avatar
FatBlackCat30
Microsoft Employee
6 years ago
Solved

Re: Multiple if statements

I am reposting this becuase I had my logic incorrect before

multiple if statement 

 

1. if load says "Many" the outcome should be "Many"

2. but if the count is > 1 the outcome should be "both"

3. but if the load does not = "Many" and the count is <1 then the outcome should be the load column

 

 

LoadCount LoadCountOutcome
Many1 Many1Many
Cat2 Cat2Both
Dog2 Dog2Both
Car1 Car1Car
Many2 Many2Many
Bottle2 Bottle2Both
Board1 Board1Board
Phone1 Phone1Phone
Tree1 Tree1Tree
  • Anonymous's avatar
    Anonymous
    6 years ago

    Try

     

    Outcome = IF('Table'[Load] = "Many", "Many", IF('Table'[Count] > 1, "Both", 'Table'[Load]))
  • FatBlackCat30,

     

    Try this:

    Column = 
    SWITCH(TRUE(),
        Table1[Load] = "Many", "Many",
        Table1[Count] > 1, "Both",
        Table1[Load])

    Result:

     

    Kind regards

    Djerro123

    -------------------------------

    If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

    Keep those thumbs up coming! 🙂

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Try

     

    Outcome = IF('Table'[Load] = "Many", "Many", IF('Table'[Count] > 1, "Both", 'Table'[Load]))
  • JarroVGIT's avatar
    JarroVGIT
    Resident Rockstar

    FatBlackCat30,

     

    Try this:

    Column = 
    SWITCH(TRUE(),
        Table1[Load] = "Many", "Many",
        Table1[Count] > 1, "Both",
        Table1[Load])

    Result:

     

    Kind regards

    Djerro123

    -------------------------------

    If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

    Keep those thumbs up coming! 🙂