Forum Discussion

Alirezam's avatar
Alirezam
Icon for Helper V rankHelper V
7 years ago
Solved

aggregation of rows

Hi dudes,

 

I have tons of data in half-hour format and want to aggregate them to hourly format adding two half-hour data together for each hour. The excel sample is attached. Any idea how to do it in Power bi or even excel?

what I want to see is the "Sum" column which is sum of kWh,

Regards,

 

https://1drv.ms/x/s!Al3r7IU8GY3yxT2t81XOpq0xdmcj?e=lTUTAP

 

  • Once you have the correct time on each row you just need a measure 

    Sum = SUM ( table[kWh] )

    then you pull the Year, Month, Day and time from the table and add in the measure.

3 Replies

  • ello Alirezam 

    In PowerQuery, when you pull the information in, if you select the time column you can transform it to "Start of hour". The do another time transform to go to time only.

    • Alirezam's avatar
      Alirezam
      Icon for Helper V rankHelper V

      Yes, but this was not my answer, may you please read again what I had asked? Thanks anyway

      • jdbuchanan71's avatar
        jdbuchanan71
        Icon for Super User rankSuper User

        Once you have the correct time on each row you just need a measure 

        Sum = SUM ( table[kWh] )

        then you pull the Year, Month, Day and time from the table and add in the measure.