Forum Discussion
DAX_newbiee
2 years agoNew Member
Calculate time between 2 process
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...
- 2 years ago
DAX_newbiee
2 years agoNew Member
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
DAX_newbiee
2 years agoNew Member
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
- danextian2 years ago
Super User
- DAX_newbiee2 years agoNew Member
danextian thank you so much for the help it worked