Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Vemul
Helper I
Helper 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 DateIssue DateStatus 
22/02/202320/02/202320/02/2023On Time 
21/02/202318/02/202317/02/2023On Time 
22/02/202320/02/202321/02/2023Late
22/02/202320/02/2023#Late
24/02/202326/02/2023#Wainitng 
1 REPLY 1
MAwwad
Super User
Super User

 

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") )
 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.