Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Summarise Hourly Values

I have hourly readings as below. 

When I put them into a table in PowerBI it only gives the first figure from the day:

 

I need it to aggregate all 24 November 1 values into November 1.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Below is my table:

    The following DAX might work for you:

    Measure1 = 
       CALCULATE(
         SUM('Table'[Reading]),
         ALLEXCEPT('Table','Table'[Date].[Day])
       )

    The final output is shown in the following figure:

    Best Regards,

    Xianda Tang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous Thank you for replying,

     

    When I put that in, I am unable to choose [date].[day] from my date column. Is that because it is not a date heirarchy? 


    DAX is this: 

    Gas_Day_Sum = CALCULATE(
         SUM(Gas_Consumption[Reading (kWh)]),
         ALLEXCEPT(Gas_Consumption,Gas_Consumption[Date (Period Beginning)])
       )

    Result is this:

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous ,

      You can try to create a Calculated columns.

      Best Regards,

      Xianda Tang

      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.