Forum Discussion

AlGrant's avatar
AlGrant
Frequent Visitor
3 years ago
Solved

New conditional Column based on two status columns in the same table

Hello,   I'm a new Powerbi user and am having issues creating a measure, any help would be appreciated.   Within a single table I have two columns for item status, one based on Migration Status a...
  • jdbuchanan71's avatar
    3 years ago

    AlGrant 

    You can do that with a calcualted column using a SWITCH statement like this.

     

    Actual Program Status = 
    SWITCH ( 
        TRUE(),
        YourTable[Migration Status] = "Complete" && YourTable[Decom Status] = "Complete", "Complete",
        YourTable[Migration Status] <> "Not Started" && YourTable[Decom Status] = "Not Started", "In Progress",
        YourTable[Migration Status] = "Complete" && YourTable[Decom Status] <> "Complete", "Decom Pending",
        YourTable[Migration Status] = "Not Started" && YourTable[Decom Status] = "Not Started", "Not Started",
        "Other"
    )

     

    You would just need to change the name of the table to match your model.