Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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
Location | Running | ActionDate |
Line7 | 0 | 27-04-17 16:26 |
Line7 | 1 | 27-04-17 14:31 |
Line7 | 0 | 27-04-17 14:31 |
Line7 | 1 | 27-04-17 13:01 |
Line7 | 0 | 27-04-17 12:29 |
Line7 | 1 | 27-04-17 12:00 |
Line7 | 0 | 27-04-17 11:43 |
Line7 | 1 | 27-04-17 11:24 |
Line7 | 0 | 27-04-17 10:37 |
Line7 | 1 | 27-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
Solved! Go to 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)
Make this small change and it should look like this.
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.
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.
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?
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)
Make this small change and it should look like this.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.