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
Solved! Go to Solution.
It would be helpful next time (or if this doesn't work) to include some sample data to work with.
The order matters with these statements, so try this instead.
Status Approval =
SWITCH (
TRUE (),
ISBLANK ('Execution Status'[Approved Date].[Date])
&& ('Execution Status'[Due Date].[Date]) < TODAY (), "Overdue",
ISBLANK ( 'Execution Status'[Approved Date].[Date] ), "In Process",
'Execution Status'[Approved Date].[Date] < 'Execution Status' [Due Date].[Date], "On Time",
"Completed Late"
)
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
Hi,
Try this calculated column formula
Status Approval = IF(ISBLANK([Approved Date]),IF(TODAY()>[Due date],"Overdue","In Process"),IF([Approved Date]>[Due Date],"Late","On Time"))
Hope this helps.
If I understand you correctly, maybe something like this...
Status Approval =
SWITCH (
TRUE (),
ISBLANK ( '[Approved Date].[Date]' )
&& '[Due Due].[Date]'
> TODAY (), "Overdue",
'[Approved Date].[Date]' > '[Due Date].[Date]', "Late",
ISBLANK ( '[Approved Date].[Date]' ), "In Process",
"On Time"
)
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
PowerBI doesn't like that
Try removing the single quotes maybe?
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
Had to do that and add the table name. Not throwing an error anymore, but still not populating the field correctly.
Overdue seems to be working correctly, but the filed is populating with On Time when the Approved date field is blank. That should be "In Process". The "Completed late" calcuation appears to be correct as well.
Status Approval =
SWITCH (
TRUE (),
ISBLANK ('Execution Status'[Approved Date].[Date])
&& ('Execution Status'[Due Date].[Date]) < TODAY (), "Overdue",
'Execution Status'[Approved Date].[Date] < 'Execution Status' [Due Date].[Date], "On Time",
ISBLANK ( 'Execution Status'[Approved Date].[Date] ), "In Process","Completed Late"
)
It would be helpful next time (or if this doesn't work) to include some sample data to work with.
The order matters with these statements, so try this instead.
Status Approval =
SWITCH (
TRUE (),
ISBLANK ('Execution Status'[Approved Date].[Date])
&& ('Execution Status'[Due Date].[Date]) < TODAY (), "Overdue",
ISBLANK ( 'Execution Status'[Approved Date].[Date] ), "In Process",
'Execution Status'[Approved Date].[Date] < 'Execution Status' [Due Date].[Date], "On Time",
"Completed Late"
)
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
That did the trick. Thank you so much for your help. Still trying to learn all of this.
Happy to help.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
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 |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |