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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Calculated Column with multiple IF Else Then

I've searched for an answer to this, but haven't been able to find a solution.  

 

I need a statement that says:

IF [FIELD A] <-15 THEN "EARLY"

IF [FIELD A] >-15<15 THEN "ON-TIME"

ELSE "LATE"

 

In other words, I am looking at [FIELD A] .  I need a new column that will look at the value in [FIELD A] and give 3 results, depending on the value in [FIELD A] - "EARLY", "ON-TIME" OR "LATE".

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@Anonymous You can use a switch statement:

SWITCH(TRUE(),

[Field A] < -15,"Early",

[Field A] >= -15 && [Field A] < 15,"On Time",

"Late")

View solution in original post

v-yuta-msft
Community Support
Community Support

Hi schwinnen,

 

Yes, switch can do this, you can also create a calculate column using nested if() statement in DAX like pattern below:

 

Result =
IF (
    Table[FIELD] < -15,
    "EARLY",
    IF ( Table[FIELD] > -15 && Table[FIELD] < 15, "ON-TIME", "LATE" )
)

Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi schwinnen,

 

Yes, switch can do this, you can also create a calculate column using nested if() statement in DAX like pattern below:

 

Result =
IF (
    Table[FIELD] < -15,
    "EARLY",
    IF ( Table[FIELD] > -15 && Table[FIELD] < 15, "ON-TIME", "LATE" )
)

Regards,

Jimmy Tao

Anonymous
Not applicable

@Anonymous You can use a switch statement:

SWITCH(TRUE(),

[Field A] < -15,"Early",

[Field A] >= -15 && [Field A] < 15,"On Time",

"Late")

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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