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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
Community Champion
Community Champion

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.