Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Aggregation(sum) from time column

Hi, 

I would like to get help to make calculated column by 3 hrs aggregation (sum of value column) from DateTime column or  Start of Hour column for each datasetID. Here is my dataset:

Capture.PNG

 

Thank you!

 

3 REPLIES 3
dax
Community Support
Community Support

Hi @Anonymous ,

Did you want to get rolling value of 3 hours? If so , you could refer to my sample for details. (It seems that each hour's duration of timestamp is 3600 in your sample).

Best Regards,
Zoe Zhi

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

HotChilli
Super User
Super User

Do you want a rolling 3 hrs (so for each row, add up all values in the last 3 hours) or do you want to define periods of 3 hours from the first row 1500-1800, 1800-2100 etc?

 

Perhaps you could reply with the desired output from the supplied dataset (also can you post the dataset as data and not a picture please?)

Anonymous
Not applicable

Hi @HotChilli ,

Thank You! there is value for each 15 min. but i would like to have value as aggregated by 3 hours.  the desired output as follows:

value 

DateTime

Calculated column 1 (Date/Time)

calculated column2 (value)

0.004

04-03-2019 15:15:00

04/03/2019 15:00

aggregated value

0

04-03-2019 15:45:00

04/03/2019 18:00

aggregated value

0.002

04-03-2019 16:00:00

04/03/2019 21:00

aggregated value

0.001

04-03-2019 16:15:00

04/03/2019 00:00

 

0

04-03-2019 16:30:00

04/03/2019 03:00

 

0.001

04-03-2019 16:45:00

04/03/2019 06:00

 

0

04-03-2019 17:00:00

04/03/2019 09:00

 

0

04-03-2019 17:15:00

04/03/2019 12:00

 

0.001

04-03-2019 17:30:00

04/03/2019 00:00

 

0

04-03-2019 17:45:00

04/03/2019 03:00

 

0.001

04-03-2019 18:00:00

04/03/2019 06:00

 

0

04-03-2019 18:15:00

04/03/2019 09:00

 

0.001

04-03-2019 18:30:00

04/03/2019 12:00

 

0

04-03-2019 18:45:00

06/03/2019 15:00

 

0.001

04-03-2019 19:00:00

06/03/2019 18:00

 

0

04-03-2019 19:15:00

06/03/2019 21:00

 

0.001

04-03-2019 19:30:00

07/03/2019 00:00

 

0

04-03-2019 19:45:00

07/03/2019 03:00

 

0

04-03-2019 20:00:00

07/03/2019 06:00

 

0

04-03-2019 20:15:00

 

 

 

Thank you!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.