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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Ptown
Helper I
Helper I

Need help manipulating rows of half hourly sensor data from multiple sensors into one graph

I have a spreadsheet with approx. 150,000 rows of half hourly sensor data.

 

There is a Sensor Hardware ID column, a date column. Then 48 columns representing each 30 minute period in a day, which contain values for the sensor reading during that period.

 

Below example data table of dummy data that I hope explains the structure. I have only put data for 2 sensors for 2 days, rather than pasting 150,000 rows. I have only put data from 00:00 to 02:30 (6 data columns rather than all 48). 

 

The output that I would like to get can be seen in the sketch below. I would like a graph that has sensor reading on the Y axis and time of day on the X axis. The reading values of the graph would be the average (at each time of day) for the days selected by a filter. Each sensor would be a different coloured line on the legend.

 

Please could someone help me understand how I need to manipulate my raw data into a form that will get me my desired result? Sorry if I'm asking in the wrong place or my question isn't clear. Or if the answer is already out there somewhere, I've tried searching for a solution but have had a hard time knowing what to search for.

 

Example data table

Sensor Hardware IDDATE00:0000:3001:0001:3002:0002:30
ID-000101/01/2019336.9413.8820.8127.7534.69
ID-000102/01/2019224.639.2513.8818.5023.13
ID-000201/01/2019190.020.040.060.080.10
ID-000202/01/2019230.040.080.130.170.21

 

Graph:

https://www.imageupload.net/image/jZHDb

https://imgur.com/a/nLdl2GH

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks @Ashish_Mathur !

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

First, you need to unpivot the data https://radacad.com/pivot-and-unpivot-with-power-bi

You need to have date and time dimension to analyze your data better

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

Appreciate your Kudos. mark me with @

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks @amitchandak !

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.