Forum Discussion

Ikeumlaut's avatar
Ikeumlaut
Advocate I
8 years ago

Cumulative count over time

Hey,

 

I need to standardize my data. I get at irregular intervals a value for my devices. Message is sent when status changes. Here is an example data and what I mean by standardizing. In this example is to convert time to 10min sections.

10ATime10:1110:1410:18  10:48 
 Value1 0 10 
       
20BTime10:18 10:34 10:51
 Value0 1 0
       
 Would look like this if "cumulative"  in 10min sections->      
       
10A&20BTime10:1010:2010:3010:4010:50
 Cumulative value11210

 

Here is how the data looks like:

TimeDeviceValue
28.3.2018 10:1110A1
28.3.2018 10:1410A0
28.3.2018 10:1810A1
28.3.2018 10:4810A0
28.3.2018 10:1820B0
28.3.2018 10:3420B1
28.3.2018 10:5120B0

 

How do I write a Measure to convert the data into a table visual like this?

TimeCumulative value
28.3.18 10:101
28.3.18 10:201
28.3.18 10:302
28.3.18 10:401
28.3.18 10:500

 

Thanks!

5 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi Ikeumlaut,

     

    One concern: 

    How to group those time values based on 10 min interval? 

     

     

    Why is 10:11 for 10A matched with 10:18 for 20B? Why should these two values belong to 10:10? While 10:14 for 10A and 10:18 for 10A belong to 10:20 and 10:30 section.

     

    Best regards,

    Yuliana Gu

    • Ikeumlaut's avatar
      Ikeumlaut
      Advocate I

      Hey v-yulgu-msft

       

      sorry, that is a mistake on the chart. I edited my post and it messed up it. So the grouping is:

      • 10:00
        • 10:11, 10:14, 10:18

       

      Best,

      Ike

      • v-yulgu-msft's avatar
        v-yulgu-msft
        Microsoft Employee

        Hi Ikeumlaut,

         

        I am still confused about this calculation. That case, the Cumulative value for "28.3.18 10:10" in result table should be 2 rather than 1. Also, the Cumulative value for "28.3.18 10:20" in result table should be 0.

         

         

        Regards,

        Yuliana Gu