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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Meinhardt
Regular Visitor

New table from based on existing (Sensor data and time data to average per hour).

Hi everyone!

I'm new to Power BI, and I have a question that might be straightforward, but I haven't been able to figure it out yet.

I have a dataset with temperature measurements and their corresponding timestamps, where data is collected several times per hour. In Power Query, I want to create a new table based on the original one, where the temperature is averaged for each hour. I've managed to do this in the Power BI "Report View" (see media attached), but I want to create a new table in Power Query so I can use this averaged data for further analysis before visualizing it in Power BI.

Can anyone guide me on how to achieve this in Power Query?

Meinhardt_0-1716197060630.png

 

I have shared my Power BI File in the following link (Here)

 

 

2 ACCEPTED SOLUTIONS
HotChilli
Super User
Super User

It will be a 'Group By' on date and time with Average of the temperature.  It's done via the interface on the 'Home' tab.

View solution in original post

Anonymous
Not applicable

Hi @Meinhardt 

 

@HotChilli has pointed out the correct direction. Here is a document for your reference: How to GROUP BY or summarize rows - Power Query As you already have Dato and Klokke (Time) columns in table Rum-Labratorie, you can duplicate or reference this table, then in the new table, group by Dato and Klokke (Time) columns to have the average of Temperatur in a new column. 

 

In addition, it seems the current TidsTabel's Klokke (Time) column is probably not correct. I feel like creating it with below code will be better.  

Time.StartOfHour([#"Klokke (minut)"])

vjingzhanmsft_1-1716282284106.png

 

Best Regards,
Jing

View solution in original post

6 REPLIES 6
Meinhardt
Regular Visitor

Thanks @HotChilli
That was much easier than the way i was trying to solve it. 

Anonymous
Not applicable

Hi @Meinhardt 

 

@HotChilli has pointed out the correct direction. Here is a document for your reference: How to GROUP BY or summarize rows - Power Query As you already have Dato and Klokke (Time) columns in table Rum-Labratorie, you can duplicate or reference this table, then in the new table, group by Dato and Klokke (Time) columns to have the average of Temperatur in a new column. 

 

In addition, it seems the current TidsTabel's Klokke (Time) column is probably not correct. I feel like creating it with below code will be better.  

Time.StartOfHour([#"Klokke (minut)"])

vjingzhanmsft_1-1716282284106.png

 

Best Regards,
Jing

Thanks for the indept explaination! and the link too! that realy gave me a better understanding. 🙂 

Furthermore, thanks for giving me a heads-up on the error. 
Rearding the error. When i open the file i dont have the same error? can it be some kind different setup?

Meinhardt_0-1716450980578.png

 



Anonymous
Not applicable

I thought that Klokke (Time) column should have hourly time points. Not sure if I understand it correctly?

vjingzhanmsft_0-1716457063166.png

Finally i understand what you are trying to tell me! 
Thanks for making me aware. 
I have fixed that now 🙂 
*i guess i'm gettig confused by looking at all the numbers.

HotChilli
Super User
Super User

It will be a 'Group By' on date and time with Average of the temperature.  It's done via the interface on the 'Home' tab.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.