Forum Discussion
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
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
- Phil_Seamark
Microsoft Employee
- sullynivekFrequent Visitor
emtc_ref_id rpt_date chg_costcenter work_grp empl_id craft chg_account wo hrs rate act_cost crd_account assetno work_type login_id work_area workreq 605513 03/04/2017 WC30 999 9999Z00 99999 PLANT MAINT 0029 MA1 310010 P136504 8 18.07 144.56 310010 97035 PPM Matthomas C FLT, Kalmar DCD 160-12: 16T six Monthly Service 605664 04/04/2017 WC30 999 9999Z00 99999 ELECTRICAL 0029 MA1 310010 P137522 2 18.07 36.14 310010 M1 PPM Matthomas C2 3mth. Electrical Service of No.3 Impounding Pump and associated equipment 605669 04/04/2017 WC30 999 9999Z00 99999 MECHANICAL 0029 MA1 310010 C167276 4 18.07 72.28 310010 AD3 ADM Matthomas C0 Training & College 2017 605814 05/04/2017 WC30 999 9999Z00 99999 MECHANICAL 0029 MA1 310010 C167287 4 18.07 72.28 310010 BLD61 RMW Matthomas C3 clean workshops/cowshed/yard 2017 605807 05/04/2017 WC30 999 9999Z00 WD204 MECHANICAL 0029 MA1 310010 C168599 4 18.07 72.28 310010 CQ03 SIR Matthomas C1 Zurich remedial 15/03/17 - the rope is splintered / damaged and should be renewed 605666 04/04/2017 WC30 999 9999Z00 99999 ELECTRICAL 0029 MA1 310010 P137521 2 18.07 36.14 310010 M1 PPM Matthomas C2 3mth Electrical Service of No.1 Impounding Pump and associated equipment 605625 03/04/2017 WB30 999 9999Z00 99999 PROJECT 0036 MAN 310010 C168311 1.5 0 0 310010 96699 RMW CSalter N0 ABP HV electrical work 606177 07/04/2017 WC30 341 1041100 WD201 MECHANICAL 0029 MA1 310010 C168617 5 18.07 90.35 310010 FLT01 RMW Matthomas C Service repairs off side hub repairs 606179 07/04/2017 WC30 341 1041100 WD201 MECHANICAL 0029 MA1 310010 C168752 2 18.07 36.14 310010 FLT08 RMW Matthomas C Replace throttle cable. 605988 06/04/2017 WC30 999 9999Z00 99999 ELECTRICAL 0029 MA1 310010 P137466 2 18.07 36.14 310010 CP0 PPM Matthomas C3 Monthly Mechanical and Electrical inspection of all Lock Capstans and power packs. 605992 06/04/2017 WC30 999 9999Z00 99999 ELECTRICAL 0029 MA1 310010 P137524 1.5 18.07 27.105 310010 S1 PPM Matthomas C1 3 mth Electrical/Mechanical service of NS Outer LGM.
** Follow SSOW.No.23 **605996 06/04/2017 WC30 999 9999Z00 99999 ELECTRICAL 0029 MA1 310010 P137525 1.5 18.07 27.105 310010 S2 PPM Matthomas C1 3mth.Electrical/Mechanical service of SS.Outer LGM
** Follow SSOW.No.23 **605990 06/04/2017 WC30 999 9999Z00 99999 ELECTRICAL 0029 MA1 310010 P137526 1.5 18.07 27.105 310010 S5 PPM Matthomas C1 3mth.Electrical/Mechanical Service of NS.Inner LGM
** Follow SSOW.No.23 **605994 06/04/2017 WC30 999 9999Z00 99999 ELECTRICAL 0029 MA1 310010 P137527 1.5 18.07 27.105 310010 S6 PPM Matthomas C1 3mth.Electrical/Mechanical Service of SS.Inner LGM
** Follow SSOW.No.23 **605671 04/04/2017 WC30 999 9999Z00 99999 MECHANICAL 0074 MA1 310010 C167276 4 19.72 78.88 310010 AD3 ADM Matthomas C0 Training & College 2017 605813 05/04/2017 WC30 999 9999Z00 99999 MECHANICAL 0074 MA1 310010 C167287 4 19.72 78.88 310010 BLD61 RMW Matthomas C3 clean workshops/cowshed/yard 2017 605999 06/04/2017 WC30 999 9999Z00 99999 MECHANICAL 0074 MA1 310010 C167287 8 19.72 157.76 310010 BLD61 RMW Matthomas C3 clean workshops/cowshed/yard 2017 605627 03/04/2017 WE30 999 9999Z00 99999 PROJECT 0036 MAN 310010 C167667 1 0 0 310010 23422 RMW CSalter S1 Swansea LV Work - sullynivekFrequent 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