Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Solved! Go to Solution.
Approval Metric = IF(ISBLANK([Approved Date].[Date]), "Being Performed", IF(([Approved Date].[Date]>[Due Date].[Date],"Late","On Time"))
The SWITCH function in DAX is very similar to using a nested IF function. Please try something like this:
ApprovalMetric = SWITCH(
TRUE(),
[Approved Date] = Blank(),"In Progress",
[Approved Date] > [Date], "Late",
"On Time" )
Hope you can get this to work for you.
Regards,
Approval Metric = IF(ISBLANK([Approved Date].[Date]), "Being Performed", IF(([Approved Date].[Date]>[Due Date].[Date],"Late","On Time"))
This worked like a charm, although you did have an extra parenthesis in your formula.
Approval Metric = IF(ISBLANK([Approved Date].[Date]), "Being Performed", IF(([Approved Date].[Date]>[Due Date].[Date],"Late","On Time"))
I'm glad it worked. The other solution by @rsbin would also work 🙂
And I'm sorry for the extra parenthesis!
@JorgePinho , @PowerBINoob24 ,
Hence why I have learned to use the SWITCH. Alleviates the issue with all of those parenthesis.😁
You're right! And it also looks a lot cleaner and easier to read and understand 😀