The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Trying to calculate staff capacity to do work.
I have a Fact table ('Work Tracker') where each row = Work Item, with each item having a start and end date and up to 7 resources with the capacity required for each (held as a decimal where Full Time Equivilant = 1.0) e.g. Resource Name 1, Capacity 1, Resource Name 2, Capacity 2 etc.
We have an organisation 'dimDates' table which looks extensive enough, and I have inactive 1..* relationship from the dimDates table to the Start and End dates in the 'Work Tracker' Fact table.
I know I'll need a measure(s?), but can't work out the DAX and am stuck.
I need to be able to sum up the total capacity across all work and show a month by month view on a line and stacked column chart (my line comes from another table which is working which shows the average availability).
I also need to be able to order the months correctly, ideally the start month on the visual = first month out of data from Start Dates and the last month out of the data from End Dates, handling any blanks where no Capacity recorded for a given month, and showing the year below the months.
The Y axis 'FTE Count' is the sum of Capacity for a given month
The report will need to be able to handle month start and end, and where the Start Date and End Dates are not the beginning or end of the month.
The stack is to show by Deputy Director column for each month
An additional bonus would be to then see by individual Resource Name, although this could be on a separate report page.
'Work Tracker' table below:
|
Thanks
Solved! Go to Solution.
Next step would be to filter a or b with NETWORKDAYS.
Hi @lbendlin
thanks for your reply.
If we took your work to date on this, and the DAX, and then divided the 'worked figure' by working days (days - weekend and public holidays) in a month, this might give us the monthly capacity used, agree?
This would need to be applied and work at severa levels, I think;
individual resource, Deputy Director and a single figure for the whole team (that view is needed as a total of capacity used across the team.)
eg
Jim worked 5 out of 23 working days in Jan: 5/23 = 0.27 capacity used
Whole team in Jan: 147 / 23 = 6.4 capacity used
How would the DAX look then?
It isn't pin point accurate- but gives an indicative figure.
Ps - what is the "sm" , [sm] in the DAX measure referring to?
"sm" is a random name I picked for the additional column of the table variable a. You can refer to the syntax for ADDCOLUMNS.
Your data model has a Calendar table with a "workday" flag, right?
Thanks for the insight on "sm"
Data model Calendar table has:
Weekday (lists day of the week ie Wedensday)
WeekdayWeekend (choice of Weekday or Weekend)
IsBankHoliday (True or False)
Next step would be to filter a or b with NETWORKDAYS.
What's your capacity currency? Days? Hours? Minutes? Does your calendar table have a workday flag? What are the business hours? Timezones?
Hi there
so capacity currency as stated is FTE (|Full Time Equivilant) where a Full Time employee is 1.0. We use FTE as it is both a way of determining headcount, but also in more granularity, capacity.
In this report, the data is captured under 'Resource 1 Capacity' and similar columns, and so how much capacity an item of work requires is captured by staff member(s) and expressed as the decimal figure e.g. 0.1, 0.5 etc.
The Y axis in the report expresses the total FTE, and the lines (form another table that is working fine) show the full FTE count (red line) and the maximum capacity (orange) we should not go beyond as we then impact on the time needed to do other responsibilities (line management, admin, learning etc).
The calendar table does seem to have a weekday column (values for what day of the week it is) and a 'WeekdayWeekend' column where values are one or the other depending obviously on the day of the week. There is also a 'IsBankHoliday' column for the public holidays.
The business hours aren't relevant I think, the timezone is GMT, but I also think its not relevant!
Unpivot or split the work tracker table to bring it into usable format and post a sample of the calendar table.
Hi there
Ive simplified the work tracker table:
Work Ref | Title of Work | Description of Work | Start Date | End Date | Deputy Director | Resource 1 Name | Resource 1 Capacity | Resource 2 name | Resource 2 Capacity | Resource 3 name | Resource 3 Capacity | Resource 4 name | Resource 4 Capacity | Resource 5 name | Resource 5 Capacity | Resource 6 name | Resource 6 Capacity | Resource 7 name | Resource 7 Capacity |
23-0031 | Work 1 | get stuff done | 02/10/2023 | 01/05/2024 | Fred | Olga | 0.70 | Petra | 0.20 | James | 0.20 |
|
|
|
|
|
|
|
|
23-0032 | Work 2 | get more stuff done | 01/12/2023 | 01/05/2024 | Bert | Petra | 0.70 | Olga | 0.20 | Bob | 0.30 |
|
|
|
|
|
|
|
|
23-0045 | Work 3 | re-do stuff | 02/11/2023 | 30/07/2024 | Ernie | Peter | 0.40 | Bob | 0.40 | James | 0.20 | Petra | 0.10 |
|
|
|
|
|
|
23-0046 | Work 4 | examine results | 02/11/2023 | 31/05/2024 | Barnie | James | 0.20 | Bob | 0.30 |
|
|
|
|
|
|
|
|
|
|
23-0047 | Work 5 | discuss results | 31/08/2023 | 31/10/2024 | Grover | Lulu | 0.30 | Elton | 0.20 |
|
|
|
|
|
|
|
|
|
|
23-0048 | Work 6 | sit on results | 31/08/2023 | 31/12/2024 | Barnie | Elton | 0.50 | James | 0.30 |
|
|
|
|
|
|
|
|
|
|
23-0049 | Work 7 | get stuff done again | 31/08/2023 | 01/06/2024 | Jimmy | Jim | 0.20 | Lulu | 0.30 |
|
|
|
|
|
|
|
|
|
|
23-0050 | Work 8 | christmas party | 31/08/2023 | 30/04/2024 | Fred | Bob | 0.10 | Lulu | 0.40 |
|
|
|
|
|
|
|
|
|
|
Here is a sample of the calendar table:
Date | MonthNum | Month | MonthLong | Quarter | Year | FiscalMonthNum | FiscalMonth | FiscalMonthLong | FiscalQuarter | FiscalYear | CurMonthOffset | CurQuarterOffset | CurYearOffset | FutureDate | CurFiscalYearOffset | MonthYearNum | MonthYear | MonthYearLong | WeekdayNum | Weekday | WeekdayWeekend | WeekSequenceNum | CurWeekOffset | EndOfMonth | ReportingMonth | ReportingMonthName | ReportingMonthYear | ReportingMonthYearNum | EndofWeek | FiscalWeekNum | IsReportingDay | IsBankHoliday | FiscalBudgetVersion | FiscalForecastVersion | CurFiscalWeekOffset | ReportingMonthNum | ReportingMonthYearNum2 | CurrentDayOffset | IsLeapYear | StartofMonth | DaysIntoFinancialYear | DayNum | CurReportingMonthOffset | Today Slicer | Last Full Month Slicer | CY+1 | CY+2 | CY+3 | CY+4 | CY+5 | CY+6 | FiscalYearNum |
31-Dec-24 | 12 | Dec | December | Q4 | 2024 | 9 | Dec | December | FQ3 | 2024/2025 | 11 | 3 | 0 | Future | 1 | 202412 | Dec-24 | Dec-24 | 2 | Tue | Weekday | 875 | 49 | 31-Dec-24 | 31-Dec-24 | Dec | Dec-24 | 202412 | 04-Jan-25 | 40 | FALSE | FALSE | B09 | F10 | -4 | 9 | 202409 | 341 | TRUE | 01-Dec-24 | 275 | 31 | 11 | 12/31/2024 | Dec-24 | 2025/2026 | 2026/2027 | 2027/2028 | 2028/2029 | 2029/2030 | 2030/2031 | 4049 |
30-Dec-24 | 12 | Dec | December | Q4 | 2024 | 9 | Dec | December | FQ3 | 2024/2025 | 11 | 3 | 0 | Future | 1 | 202412 | Dec-24 | Dec-24 | 1 | Mon | Weekday | 875 | 49 | 31-Dec-24 | 31-Dec-24 | Dec | Dec-24 | 202412 | 04-Jan-25 | 40 | FALSE | FALSE | B09 | F10 | -4 | 9 | 202409 | 340 | TRUE | 01-Dec-24 | 274 | 30 | 11 | 12/30/2024 | Dec-24 | 2025/2026 | 2026/2027 | 2027/2028 | 2028/2029 | 2029/2030 | 2030/2031 | 4049 |
User | Count |
---|---|
12 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
9 | |
7 |