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
Jay2022
Helper IV
Helper IV

MUltiple IF and statements

Hi I keep getting Syntax errors when I try the following formula. Where am I going wrong 

 

New_Column = IF('Table'[Store]= "A", "A",

IF('Table'[Store]= "B", "B",

IF('Table'[Store]= "C", && (‘Table’[Sales Date]<=TODAY(), “B”

IF('Table'[Store]= "D", && (‘Table’[Sales Date]<=TODAY(), “B”

IF('Table'[Store]= "C", && (‘Table’[Sales Date]>TODAY(), “C”

IF('Table'[Store]= "D", && (‘Table’[Sales Date]>TODAY(), “D”,” ”))

1 ACCEPTED SOLUTION

Hi, @Jay2022 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

View solution in original post

3 REPLIES 3
Dangar332
Super User
Super User

Hi, @Jay2022 
@Jay2022 


try below code remove (" , ")

 

 

 

 

New_Column = IF('Table'[Store]= "A", "A",

IF(
'Table'[Store]= "B", "B",

IF('Table'[Store]= "C" && ‘Table’[Sales Date]<=TODAY(), “B”,

IF('Table'[Store]= "D" && ‘Table’[Sales Date]<=TODAY(), “B”,

IF('Table'[Store]= "C" && ‘Table’[Sales Date]>TODAY(), “C”,

IF('Table'[Store]= "D" && ‘Table’[Sales Date]>TODAY(), “D”,” ”)
)))))

 

 

 

or use switch() function

 

 

New_Column = 
switch(true(),
'Table'[Store]= "A", "A",
'Table'[Store]= "B", "B",
'Table'[Store]= "C" && ‘Table’[Sales Date]<=TODAY(), “B”,
'Table'[Store]= "D" && ‘Table’[Sales Date]<=TODAY(), “B”,
'Table'[Store]= "C" && ‘Table’[Sales Date]>TODAY(), “C”,
'Table'[Store]= "D" && ‘Table’[Sales Date]>TODAY(), “D”,” ”
)

 

 

 

Hi, @Jay2022 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Thank you 

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.