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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
GMadd
Helper I
Helper I

DAX OTIF Formula to Included Scheduled Pickup

I have the formula below to help calculate my OTIF but I forgot to include any order (delivery) that has a pick up appointment. Some of our customers will schedule pick up appointment that is after the planned ship date (Dlv Plnd PGI dt) and if that is the case I do not want the order flagged as late due to the scheduled pickup appointment being different that the planned ship date. I have a column on my table that includes a date if there is a pick up appointment and is blank if it does not have a pick up appointment. What do I need to add to my formula below to take orders with pick up appoinments into consideration? Basically if the delivery has the Act. Gds Mvmnt Date after the Dlv Plnd PGI dt but has a Pick up Appt Date after the Dlv Plnd PGI dt I want the Category to be "On-Time".

Category =
SWITCH(
    TRUE(),
    OTIF[Credit]= "VERKBELEG", "Credit",
    OTIF[Full]= "Short", "Late",
    OTIF[Delivery Created Dat]> OTIF[Act. Gds Mvmnt Date], "Held for Material",
    OTIF[Act. Gds Mvmnt Date]> OTIF[Dlv Plnd PGI dt], "Late",
    "On-Time"
)
 
GMadd_0-1705009297013.png

 

 
 

 

3 REPLIES 3
saurabhtd
Resolver II
Resolver II

@GMadd  updated version of your formula
Category =
SWITCH(
TRUE(),
OTIF[Credit]= "VERKBELEG", "Credit",
OTIF[Full]= "Short", "Late",
OTIF[Delivery Created Dat] > OTIF[Act. Gds Mvmnt Date], "Held for Material",
OTIF[Act. Gds Mvmnt Date] > OTIF[Dlv Plnd PGI dt], "Late",
NOT(ISBLANK(OTIF[Pickup Appt Date])) && OTIF[Pickup Appt Date] > OTIF[Dlv Plnd PGI dt], "On-Time", 
"On-Time"
)

Any chance you can look at me question above as the measure you supplied in not what I am looking for.

thank you for your response but I guess I was not 100% on what I need. In my screen shot below I want the first delivery 88004495 to show On-Time since the Pick up Appt Date was after the Dlv Plnd PGI dt. There was no other reason for this to be late as it was not delayed due to waiting for product.  The next delivery is showing late as it should since it was shipped short. 

GMadd_0-1705078574381.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.