Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply

Custom Column, if then with multiple criteria

afternoon, getting an error message here at the green parenthesis and again at the pink "else"

 

if [#"Recovery Mechanism "] = "MYRP"
(
     if [Actual Commit Gate Date] = null 

     [#"Capex Estimate ($M)"] - [#"Approved Advanced Funding ($M)"]
     else [EAC] - [#"Approved Regulatory Estimate ($M)"]
)
else
(
     if [Actual Commit Gate Date] = null 

     [#"Capex Estimate ($M)"] - [#"Full Funding ($M)"]
     else [EAC] - [#"Full Funding ($M)"]
)

 

help please!

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

In Power Query?

The form should be:

if ... then .. else

https://learn.microsoft.com/en-us/powerquery-m/expressions-values-and-let-expression#if-expression 

 

--

I always recommend starting from the simplest possible thing that works if writing these statements causes problems, for example,

if  [#"Recovery Mechanism "] = "MYRP" then 1 else 0

 

Make that work, then add in a little bit of complexity then repeat.

View solution in original post

1 REPLY 1
HotChilli
Super User
Super User

In Power Query?

The form should be:

if ... then .. else

https://learn.microsoft.com/en-us/powerquery-m/expressions-values-and-let-expression#if-expression 

 

--

I always recommend starting from the simplest possible thing that works if writing these statements causes problems, for example,

if  [#"Recovery Mechanism "] = "MYRP" then 1 else 0

 

Make that work, then add in a little bit of complexity then repeat.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors