Forum Discussion

sullynivek's avatar
sullynivek
Frequent Visitor
9 years ago
Solved

find percent from grouped data

Hi,

 

I have a table that I have grouped the data by the following headings:

 

Planned

Absence

Reactive

Breakdowns

Damage

 

With Power BI creating the total. The grouped data is the amount of hours that  was worked within a given week. The week date is chosen by a date slicer. How would I create another column on the dashboard table to give me a percentage of the hours worked by category of the total hours. i.e.

 

Absence is 150 hours for a single week out of a total of 1500 hours - therefore it is 10% of the working week.

 

Any help would be appreciated.

 

P.S. I have only recently converted from excel to PBi within the last week.

 

Kevin

  • sullynivek's avatar
    sullynivek
    9 years ago

    All,

     

    Just for information here is the solution:

     

     

    Measure = DIVIDE(SUM('Emtc joined with wkaw'[hrs]),CALCULATE(SUM('Emtc joined with wkaw'[hrs]), ALLSELECTED('Emtc joined with wkaw'[Weekly Utilisations])),0)

4 Replies

    • sullynivek's avatar
      sullynivek
      Frequent Visitor
      emtc_ref_idrpt_datechg_costcenterwork_grpempl_idcraftchg_accountwohrsrateact_costcrd_accountassetnowork_typelogin_idwork_areaworkreq
      60551303/04/2017WC30 999 9999Z00 99999PLANT MAINT0029MA1310010P136504818.07144.5631001097035PPMMatthomasCFLT, Kalmar DCD 160-12: 16T  six Monthly Service
      60566404/04/2017WC30 999 9999Z00 99999ELECTRICAL0029MA1310010P137522218.0736.14310010M1PPMMatthomasC23mth. Electrical  Service of No.3 Impounding Pump and associated equipment
      60566904/04/2017WC30 999 9999Z00 99999MECHANICAL0029MA1310010C167276418.0772.28310010AD3ADMMatthomasC0Training & College 2017
      60581405/04/2017WC30 999 9999Z00 99999MECHANICAL0029MA1310010C167287418.0772.28310010BLD61RMWMatthomasC3clean workshops/cowshed/yard 2017
      60580705/04/2017WC30 999 9999Z00 WD204MECHANICAL0029MA1310010C168599418.0772.28310010CQ03SIRMatthomasC1Zurich remedial 15/03/17 - the rope is splintered / damaged and should be renewed
      60566604/04/2017WC30 999 9999Z00 99999ELECTRICAL0029MA1310010P137521218.0736.14310010M1PPMMatthomasC23mth Electrical  Service of No.1 Impounding Pump and associated equipment
      60562503/04/2017WB30 999 9999Z00 99999PROJECT0036MAN310010C1683111.50031001096699RMWCSalterN0ABP HV electrical work
      60617707/04/2017WC30 341 1041100 WD201MECHANICAL0029MA1310010C168617518.0790.35310010FLT01RMWMatthomasCService repairs off side hub repairs
      60617907/04/2017WC30 341 1041100 WD201MECHANICAL0029MA1310010C168752218.0736.14310010FLT08RMWMatthomasCReplace throttle cable.
      60598806/04/2017WC30 999 9999Z00 99999ELECTRICAL0029MA1310010P137466218.0736.14310010CP0PPMMatthomasC3Monthly Mechanical and Electrical inspection of all Lock Capstans and power packs.
      60599206/04/2017WC30 999 9999Z00 99999ELECTRICAL0029MA1310010P1375241.518.0727.105310010S1PPMMatthomasC13 mth Electrical/Mechanical service of NS Outer LGM.

      ** Follow SSOW.No.23 **
      60599606/04/2017WC30 999 9999Z00 99999ELECTRICAL0029MA1310010P1375251.518.0727.105310010S2PPMMatthomasC13mth.Electrical/Mechanical service of SS.Outer LGM

      ** Follow SSOW.No.23 **
      60599006/04/2017WC30 999 9999Z00 99999ELECTRICAL0029MA1310010P1375261.518.0727.105310010S5PPMMatthomasC13mth.Electrical/Mechanical Service  of NS.Inner LGM

      ** Follow SSOW.No.23 **
      60599406/04/2017WC30 999 9999Z00 99999ELECTRICAL0029MA1310010P1375271.518.0727.105310010S6PPMMatthomasC13mth.Electrical/Mechanical Service of SS.Inner LGM

      ** Follow SSOW.No.23 **
      60567104/04/2017WC30 999 9999Z00 99999MECHANICAL0074MA1310010C167276419.7278.88310010AD3ADMMatthomasC0Training & College 2017
      60581305/04/2017WC30 999 9999Z00 99999MECHANICAL0074MA1310010C167287419.7278.88310010BLD61RMWMatthomasC3clean workshops/cowshed/yard 2017
      60599906/04/2017WC30 999 9999Z00 99999MECHANICAL0074MA1310010C167287819.72157.76310010BLD61RMWMatthomasC3clean workshops/cowshed/yard 2017
      60562703/04/2017WE30 999 9999Z00 99999PROJECT0036MAN310010C16766710031001023422RMWCSalterS1Swansea LV Work
      • sullynivek's avatar
        sullynivek
        Frequent Visitor

        Apoligies for the messy data, essentially what I am trying to accomplish is to group by work type and produce weekly hours from the date slicer as mentioned in my first post. this is all fine, what i am struggling with is to get the percentages, would this be done on the raw data from creating a new column or is the a way of calculating it from within the grouping?

         

        Kevin