Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hello, and thank you for reading:
There are 2 conditions that need to be met, for an end result.
if [priority] = "1 - Critical" and [major_incident] = "TRUE"
then "P1"
else if [priority] = "1 - Critical" and [major_incident] = "FALSE"
then "P5"
else null
My second statement "else if" overrides the first statement. What am I doing wrong?
More detail:
I ran the first statement alone, and it works as expected. It gives me the end result of "P1". However, when I run both the statements it replaces every row with "null" - and ignores the fact that the conditions for the first statement WERE met, but didn't reflect in my data.
How do I change my query to accomodate the first statement?
Even more detail if needed:
This question will be called a success if I can accomplish the end goal of:
If a P1 is accompanied by a TRUE Major incident = P1
If a P1 is accompanied by a FALSE Major incident = P5
If a P2 is accompanied by a TRUE Major incident = P2
If a P2 is accompanied by a FALSE Major incident = P5.
So on, so forth... all the way to a P4. And it has to be done all within 1 custom conditional column with 1 query.
ANY time "major incident" is False, the end result must be "P5"
Thank you for reading!! Any help here would be appreciated. I feel like I am very close but I have ran out of ideas.
Solved! Go to Solution.
pls try to change true and false to lower case.
= Table.AddColumn(#"Changed Type", "Custom", each if [priority]="1 - Critical" and [major_incident] =true then "p1" else if [priority]="1 - Critical" and [major_incident] =false then "p5" else null)
Proud to be a Super User!
you are welcome
Proud to be a Super User!
pls try to change true and false to lower case.
= Table.AddColumn(#"Changed Type", "Custom", each if [priority]="1 - Critical" and [major_incident] =true then "p1" else if [priority]="1 - Critical" and [major_incident] =false then "p5" else null)
Proud to be a Super User!
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 25 | |
| 23 | |
| 22 | |
| 17 | |
| 14 |
| User | Count |
|---|---|
| 27 | |
| 24 | |
| 20 | |
| 20 | |
| 19 |