March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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”,” ”))
Solved! Go to 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.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
38 | |
32 | |
24 | |
15 | |
11 |