Forum Discussion

JimiH's avatar
JimiH
Frequent Visitor
9 years ago
Solved

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

  • 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. :smileyhappy:

5 Replies

  • 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.

     

    • JimiH's avatar
      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

      • spuder's avatar
        spuder
        Resolver IV

        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.