Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I am trying to create a measure to see if the job performed is ON Time or Delayed in percentage.
Where Scheduled Job date and Actual job date are 2 columns.
Could someone please help me with DAX
Solved! Go to Solution.
@Anonymous ,
You can create a measure using DAX below:
Is Delay = VAR Delay_Time = DATEDIFF(MAX('Table'[Scheduled date]), MAX('Table'[Actual Date]), MINUTE) RETURN IF(Delay_Time > 10, "Yes", "No")
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
Could you please share some sample data and post the expected result?
Regards,
Jimmy Tao
This is the sample data,
It is to calculate difference between scheduled and actual date / total number of loads per carrier in percent. where the allowed delay is 10mins.
load_number | Customer_number | Carrier_number | Scheduled date | Actual Date |
10011 | ABC | PU99 | 1/20/2015 18:00 | 1/20/2015 0:01 |
10015 | ABC | FZMT | 1/20/2015 11:00 | 1/21/2015 0:01 |
10020 | ABC | PU99 | 1/20/2015 10:00 | 1/20/2015 0:01 |
10021 | ABC | PU99 | 1/21/2015 8:00 | 1/20/2015 0:01 |
@Anonymous ,
You can create a measure using DAX below:
Is Delay = VAR Delay_Time = DATEDIFF(MAX('Table'[Scheduled date]), MAX('Table'[Actual Date]), MINUTE) RETURN IF(Delay_Time > 10, "Yes", "No")
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You could try something like:
Job | Schedule Date | Actual Date |
1 | 1/1/2019 | 1/1/2019 |
2 | 1/1/2019 | 1/1/2019 |
3 | 1/1/2019 | 1/1/2019 |
4 | 1/1/2019 | 1/2/2019 |
5 | 1/2/2019 | 1/2/2019 |
6 | 1/2/2019 | 1/2/2019 |
7 | 1/2/2019 | 1/3/2019 |
8 | 1/3/2019 | 1/3/2019 |
9 | 1/3/2019 | 1/3/2019 |
10 | 1/3/2019 | 1/4/2019 |
User | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
85 | |
67 |