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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
JimiH
Frequent Visitor

Shift status active PIE Chart

Hello

 

Not too sure if this is possible but thought I would throw it out there

 

I have a table as per the below which documents when a production line is up or down and for how long over an 8 hr shift

 

LocationRunningActionDate
Line7027-04-17 16:26
Line7127-04-17 14:31
Line7027-04-17 14:31
Line7127-04-17 13:01
Line7027-04-17 12:29
Line7127-04-17 12:00
Line7027-04-17 11:43
Line7127-04-17 11:24
Line7027-04-17 10:37
Line7127-04-17 8:06

 

So reading from the bottom up you see the line started at 08:06 and ran until 10:37 where it stopped until 11:24 etc etc.

i want to display this in a pie chart at the end of the day where we can quickly see when the line was up or down. Also I would like

also to have the pie chart advance as the day advances ,so after 4 hrs half the pie chart would show the up/down status and the remainder of the chart would be grey. the grey portion would shorten until the 8 hrs were reached.

 

Is that possible with the data I have?

 

Regards

 

Geoff

1 ACCEPTED SOLUTION

Hi JimiH

 

oh this was just a small mistake by myself. I chose Duration Minutes for the new column. There must be something like Duration Minutes Total. (otherwise it just returns the minutes without considering the hours)

 

example.jpg

 

Make this small change and it should look like this. Smiley Happy

View solution in original post

5 REPLIES 5
spuder
Resolver IV
Resolver IV

Hi,

 

i tried to rebuild your table and problem. Maybe it is a solution for you.

 

In Power Query you can double index your data (first index starts with 0, second starts with 1)

 

Afterwards you can join the table with itselfs using the different indices.

 

When finish that you can calculate the difference between both time values. Back to Power BI you can build your pie chart with "Running" as category.

 

One last thing. I inserted a new row for the last entry. 16:26:00 -> now (or in my case 17:00:00) This must be individualized by yourself as you need it.

 

example.jpg

JimiH
Frequent Visitor

Hello ,thank you for your reply.

 

I can see the time difference between all the rows except line 11 which has '31' minutes.

 

Also could you screenshot me the double index you have created?

 

Again thanks for your help

 

Geoff

I guess your merge was the wrong way round.

 

Make sure that you've ordered your original time column descending before start to generate the inidices.

 

And make sure that you've generated an extra row for the end of the last time.

 

In the screenshot you can see the merge of the table with itself. It's in German but this shouldn't be a problem.

 

example.jpg

JimiH
Frequent Visitor

Hi thanks

 

I was refering to your column 'Duration' here ,the 31 mins in row 11 doesn't seem to make sense but the other rows do?

 

PowerBI.jpg

 

thanks for you help

 

Geoff

Hi JimiH

 

oh this was just a small mistake by myself. I chose Duration Minutes for the new column. There must be something like Duration Minutes Total. (otherwise it just returns the minutes without considering the hours)

 

example.jpg

 

Make this small change and it should look like this. Smiley Happy

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.