Forum Discussion
Duration - Several procedure - DAX
Hey Guys,
I have a dashboard to monitoring my cleaning procedure and I execute this procedure Serveral times during the day. So I Have to calculate the duration in each of the procedures. Here an example of my data.
When my value is 14 the procedure is runing and when the value goes to 30 or 31 the procedure are done.
| Time stamping | Value |
| 27/06/2020 05:40 | 0,00 |
| 27/06/2020 05:40 | 0,00 |
| 27/06/2020 05:41 | 14,00 |
| 27/06/2020 05:43 | 14,00 |
| 27/06/2020 05:43 | 14,00 |
| 27/06/2020 05:43 | 14,00 |
| 27/06/2020 05:45 | 14,00 |
| 27/06/2020 06:14 | 14,00 |
| 27/06/2020 06:17 | 14,00 |
| 27/06/2020 06:17 | 14,00 |
| 27/06/2020 06:17 | 30,00 |
| 27/06/2020 06:17 | 0,00 |
| 27/06/2020 06:21 | 12,00 |
| 27/06/2020 06:24 | 12,00 |
| 27/06/2020 06:24 | 12,00 |
| 27/06/2020 06:24 | 12,00 |
| 27/06/2020 06:25 | 14,00 |
| 27/06/2020 06:26 | 14,00 |
| 27/06/2020 06:26 | 14,00 |
| 27/06/2020 06:26 | 14,00 |
| 27/06/2020 06:53 | 14,00 |
| 27/06/2020 06:55 | 14,00 |
| 27/06/2020 06:55 | 14,00 |
| 27/06/2020 06:57 | 31,00 |
| 27/06/2020 06:57 | 0,00 |
3 Replies
- parry2kSuper User
mayara_tavares ok, what you want the output to be, it is not very clear. given the sample dataset what you think it should output.
- mayara_tavaresNew Member
I expect the durantion between de value 14 and the value 30 or 31.
input
output
In the same day I can have several times
- mayara_tavaresNew Member
hey Guys,
I have a dashboard to monitoring my cleaning procedure and I execute this procedure Serveral times during the day. So I Have to calculate the duration in each of the procedures. Here an example of my data.
When my value is 14 the procedure is runing and when the value goes to 30 or 31 the procedure are done.
Time stamping Value 27/06/2020 05:40 0,00 27/06/2020 05:40 0,00 27/06/2020 05:41 14,00 27/06/2020 05:43 14,00 27/06/2020 05:43 14,00 27/06/2020 05:43 14,00 27/06/2020 05:45 14,00 27/06/2020 06:14 14,00 27/06/2020 06:17 14,00 27/06/2020 06:17 14,00 27/06/2020 06:17 30,00 27/06/2020 06:17 0,00 27/06/2020 06:21 12,00 27/06/2020 06:24 12,00 27/06/2020 06:24 12,00 27/06/2020 06:24 12,00 27/06/2020 06:25 14,00 27/06/2020 06:26 14,00 27/06/2020 06:26 14,00 27/06/2020 06:26 14,00 27/06/2020 06:53 14,00 27/06/2020 06:55 14,00 27/06/2020 06:55 14,00 27/06/2020 06:57 31,00 27/06/2020 06:57 0,00 So, in this case I should have two procedures and the durantion of each one of them.
number of occurency Duration (minutes) 1 36 2 32 Just for note: I'm using direct query I can only use DAX for it