Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Sum Data after every 30mins

Hi,

 

My data is in every 5 mins but I need to sum it after  every 30 mins.

Please any workaround or DAX to achieve this??

 

See Sample Data Below:

 

DataTimeFLOW
01/09/2017 00:000
01/09/2017 00:010.2
01/09/2017 00:050
01/09/2017 00:050.2
01/09/2017 00:100
01/09/2017 00:100.3
01/09/2017 00:150
01/09/2017 00:160.2
01/09/2017 00:200
01/09/2017 00:210.2
01/09/2017 00:250
01/09/2017 00:250.3
01/09/2017 00:300
01/09/2017 00:310.2
01/09/2017 00:350
01/09/2017 00:350.3
01/09/2017 00:410
01/09/2017 00:410.2
01/09/2017 00:450
01/09/2017 00:450.2
01/09/2017 00:500
01/09/2017 00:510.3
01/09/2017 00:550
01/09/2017 00:560.2
01/09/2017 01:000
01/09/2017 01:010.2
01/09/2017 01:050
01/09/2017 01:060.3
01/09/2017 01:100
01/09/2017 01:110.2
01/09/2017 01:150
01/09/2017 01:150.3
01/09/2017 01:200
01/09/2017 01:210.2
01/09/2017 01:250.2
01/09/2017 01:300

 

 

7 Replies

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

    Anonymous

     

    In this scenario, you need to add Hour, Minute, and Date column in your table. Then create a first/second half hour bucket column based on Minute column. Now you can create measure to sum the Flow total group on Date, Hour, and Half Hour.

     

    Hour = HOUR(Table6[DataTime])
    Date = Table6[DataTime].[Date]
    Minute = MINUTE(Table6[DataTime])
    Half Hour = IF(Table6[Minute]<=30,"First Half","Second Half")

     

    Half Hourly Total =
    CALCULATE (
        SUM ( Table6[FLOW] ),
        ALLEXCEPT ( Table6, Table6[Date], Table6[Hour], Table6[Half Hour] )
    )
    

     

    Regards,

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

      Please how do I create Hour, Minute, and Date column.

      How do I create a first/second half hour bucket column based on Minute column. ?/

       

      Many Thanks