Forum Discussion
ArchStanton
Power Participant
4 years agoDAX IF Statement producing errors highlighted in red font
Hi, I have this written this DAX code but its producing the red error bar as per screenshot and I'm not sure why? Also, could this be better written using Variables possibly? Into Are...
- 4 years ago
ArchStanton
Yes sir, if you have got the correct results already then don't worry about it.
tamerj1
Community Champion
4 years agoHi ArchStanton
Please try
Into Area Date =
VAR FunctionalArea = 'Cases - Active'[Functional Area]
VAR SubArea = 'Cases - Active'[Sub Area]
RETURN
SWITCH (
TRUE,
FunctionalArea = "Assessment", 'Cases - Active'[tpo_legacycasecreationdate],
FunctionalArea = "Casework Support", 'Cases - Active'[new_allocationqueuecaseworksupport],
FunctionalArea = "Adjudication", 'Cases - Active'[tpo_datepassedtoadjudication],
FunctionalArea = "Early Resolution", 'Cases - Active'[tpo_dateofertacceptance],
FunctionalArea = "Assessment"
&& SubArea = "Assessment Post ERT", 'Cases - Active'[tpo_datepassedfromearlyresolution],
0
)