Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
Is it possible to use a CASE or IF statement in Power Query to query mulitple conditions?
I'm using the following IF Statement but it is not capturing the "Encrouching Budget" line.
Is therea better way to achieve the desired result?
if [budget_amountcost] = 0 then "No Budget" else if[jtd_LaborAmountCost_inclUnposted] + [jtd_GL610205AmountCost] / [budget_amountcost] < .85 then "Ontrack" else if [jtd_LaborAmountCost_inclUnposted] + [jtd_GL610205AmountCost] / [budget_amountcost] < 1.01 then "Encroaching Budget" else if [jtd_LaborAmountCost_inclUnposted] + [jtd_GL610205AmountCost] / [budget_amountcost] > 1.01 then "Over Budget" else null
Thank you.
Solved! Go to Solution.
Hi @Sime
There's nothing wrong with the syntax of that code so without some sample data it's hard to say why it's not working as you expect. You need to explain what result you are expecting.
Can you please provide sample data or your file?
The only thing I'd ask you to check at this stage is whether the calculations are being carried out as you expect.
For example, is it
[jtd_LaborAmountCost_inclUnposted] + [jtd_GL610205AmountCost] / [budget_amountcost]
or is it
( [jtd_LaborAmountCost_inclUnposted] + [jtd_GL610205AmountCost] ) / [budget_amountcost]
Regards
Phil
Proud to be a Super User!
Hi @Sime
There's nothing wrong with the syntax of that code so without some sample data it's hard to say why it's not working as you expect. You need to explain what result you are expecting.
Can you please provide sample data or your file?
The only thing I'd ask you to check at this stage is whether the calculations are being carried out as you expect.
For example, is it
[jtd_LaborAmountCost_inclUnposted] + [jtd_GL610205AmountCost] / [budget_amountcost]
or is it
( [jtd_LaborAmountCost_inclUnposted] + [jtd_GL610205AmountCost] ) / [budget_amountcost]
Regards
Phil
Proud to be a Super User!
Thank you Philip. The lack of parentheses was the cause of the issue.
Greatly appreciate your assistance.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 81 | |
| 66 | |
| 50 | |
| 45 |