This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello Guys,
Need your help in calculating the time between the two process (ABC and XYZ) then add the difference to get a total time difference using DAX measure.
Here is the screenshot
Your help is appreciated.
Solved! Go to Solution.
hI @DAX_newbiee ,
Please see attached sample pbix.
Hi @danextian
Sorry for the late reply.
| Part_Name | Datetime | Station | Processes |
| A | 03-10-2023 20:11 | Z | XYZ |
| A | 03-10-2023 23:42 | Z | ABC |
| A | 03-10-2023 23:42 | Z | ABC |
| A | 04-10-2023 00:42 | Z | XYZ |
| A | 04-10-2023 03:29 | Z | ABC |
| A | 04-10-2023 03:29 | Z | ABC |
| A | 05-10-2023 00:26 | Z | XYZ |
| A | 05-10-2023 02:17 | Z | ABC |
| A | 05-10-2023 02:17 | Z | ABC |
Here is the table.
I want to calculate the time taken by the part A from process XYZ to ABC (example: Subtract 20:11 from 23:42) for XYZ to ABC likewise (subtract 00:42 from 03:29) and so on.
after calculating the difference add all the difference to get the total time( subtract 1 + subtract 2 + subtract 3).
I hope it is clear now
@danextian
If process is XYZ then to calculate the difference immediate next row, which is having ABC should be picked.
and always process time is calculated from XYZ to ABC not vice versa.
Your help would be much appreaciated
hI @DAX_newbiee ,
Please see attached sample pbix.
Hi @DAX_newbiee ,
As always, please post a sample data that we can copy-paste (not an image). Also, you said to get the time between two processes ABC and XYZ but which row/s should be picked? You mean to get the difference between this datetime to the next datetime for each process?
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 29 | |
| 25 | |
| 25 | |
| 21 | |
| 14 |
| User | Count |
|---|---|
| 61 | |
| 50 | |
| 25 | |
| 20 | |
| 20 |