Forum Discussion
Vemul
3 years agoHelper I
Order Status calculation based on Difference between Planned Date and Issued Date
Hi All,
hope I will get some help.
what I am looking is based on below table data looking to populate "Status"
1. if issue date < Planned Date then Status = " On Time"
2. if issue date > Planned Date then Status = " Late"
3. If Issue date = # and Planned Date < Today then Status = "Late"
4. If Issue date = # and Planned Date > Today then Status = "Waiting"
I wrote below code but having difficulties get 3 & 4 conditional results.
If(maxx(Table_ORD,Table_ORD[Planned Date] )> Maxx(Table_ORD,Table_ORD[Issue Date]),"On Time","Late")
Thanks - Vemu
| Requested Date | Planned Date | Issue Date | Status |
| 22/02/2023 | 20/02/2023 | 20/02/2023 | On Time |
| 21/02/2023 | 18/02/2023 | 17/02/2023 | On Time |
| 22/02/2023 | 20/02/2023 | 21/02/2023 | Late |
| 22/02/2023 | 20/02/2023 | # | Late |
| 24/02/2023 | 26/02/2023 | # | Wainitng |
1 Reply
- MAwwadSolution Sage
Hello! Based on the conditions you have provided, you can modify your DAX formula to the following:
IF(ISBLANK(Table_ORD[Issue Date]), IF(Table_ORD[Planned Date] < TODAY(), "Late", "Waiting"), IF(Table_ORD[Issue Date] < Table_ORD[Planned Date], "On Time", "Late") )