The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 and the other Decom Status.
I would like to create a new column called "Actual Program Status" based on the below criteria:
Item | Migration Status | Decom Status | Actual Program Status |
1 | Complete | Complete | Complete |
2 | In Progress | Not Started | In Progress |
3 | Complete | Not Started | Decom Pending |
4 | Complete | In progress | Decom Pending |
5 | Not Started | Not Started | Not Started |
Solved! Go to Solution.
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.
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.
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
79 | |
57 | |
48 | |
48 |