Forum Discussion

mayara_tavares's avatar
mayara_tavares
New Member
6 years ago

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 stampingValue
27/06/2020 05:400,00
27/06/2020 05:400,00
27/06/2020 05:4114,00
27/06/2020 05:4314,00
27/06/2020 05:4314,00
27/06/2020 05:4314,00
27/06/2020 05:4514,00
27/06/2020 06:14

14,00

27/06/2020 06:1714,00
27/06/2020 06:1714,00
27/06/2020 06:1730,00
27/06/2020 06:170,00
27/06/2020 06:2112,00
27/06/2020 06:2412,00
27/06/2020 06:2412,00
27/06/2020 06:2412,00
27/06/2020 06:2514,00
27/06/2020 06:2614,00
27/06/2020 06:2614,00
27/06/2020 06:2614,00
27/06/2020 06:5314,00
27/06/2020 06:5514,00
27/06/2020 06:5514,00
27/06/2020 06:5731,00
27/06/2020 06:570,00

3 Replies

  • 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_tavares's avatar
      mayara_tavares
      New 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 

  • 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 stampingValue
    27/06/2020 05:400,00
    27/06/2020 05:400,00
    27/06/2020 05:4114,00
    27/06/2020 05:4314,00
    27/06/2020 05:4314,00
    27/06/2020 05:4314,00
    27/06/2020 05:4514,00
    27/06/2020 06:1414,00
    27/06/2020 06:1714,00
    27/06/2020 06:1714,00
    27/06/2020 06:1730,00
    27/06/2020 06:170,00
    27/06/2020 06:2112,00
    27/06/2020 06:2412,00
    27/06/2020 06:2412,00
    27/06/2020 06:2412,00
    27/06/2020 06:2514,00
    27/06/2020 06:2614,00
    27/06/2020 06:2614,00
    27/06/2020 06:2614,00
    27/06/2020 06:5314,00
    27/06/2020 06:5514,00
    27/06/2020 06:5514,00
    27/06/2020 06:5731,00
    27/06/2020 06:570,00

    So, in this case I should have two procedures and the durantion of each one of them.

    number of occurencyDuration (minutes)
    136
    232

     

    Just for note: I'm using direct query I can only use DAX for it