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.
Hi Team,
I am struggling to calculate and how case per month resource utilization in % based on start date and end date column.
example:
resource | start date | end date
r1 | 02 January 2024 | 7 February 2024
r2 | 07 February2024 | 20February 2024
r2 | 24 April2024 | 23 June 2024
r3 | 03 July 2024 | 19 August 2024
r1 | 14 March 2024 | 28 April 2024
Example expected result in verticle bar chart:
r1 utilized in Jan 18% out of working days
r2 utilized in Q1 79%
Time filter:
Year, Quarter, Month
Any stepwise instructions or redirection to article will be much helpful.
Best Regards,
KD
@Ashish_Mathur , thanks for your quick reply. I will take some time to understand the DAX functions used in file.
Menwhile adding one more complexicity in this case.
1. only workings days to be considered for overall calculations.
2. if any resource had overlapping start and end date entries which are in between the larger date span, those needs to be ignored.
example,
resource | start date | end date
r1 | 02 January 2024 | 7 February 2024
r1 | 02 January 2024 | 04 January 2024 ------ this entry need to ignore in overall utilization calculation
Hi,
After the last step of Power Query, select all columns, right click and select Remove Duplicates. Click on Close and Apply. This will take care of point 2. For point 1, you will have to create a Weekday column in the Calendar table and then tweak the CALCULATE() measure to exclude weekends.
Thanks for your quick turnaround!
I am trying to implement the suggested steps. While doing so, I am unable to understand the refernece value for 'IsWorkingDay'. can you help to get it?
'Calendar'[IsWorkingDay]
To calculate resource utilization per month based on start and end dates in Power BI, you can follow these steps:
Create a Calendar Table:
Calendar = CALENDAR(MIN('YourTable'[StartDate]), MAX('YourTable'[EndDate]))
Create a Relationship:
Calculate Working Days:
WorkingDays =
CALCULATE(
COUNTROWS('Calendar'),
'Calendar'[IsWorkingDay] = TRUE()
)
Calculate Days Worked by Each Resource:
DaysWorked =
CALCULATE(
COUNTROWS('Calendar'),
FILTER(
'Calendar',
'Calendar'[Date] >= MIN('YourTable'[StartDate]) &&
'Calendar'[Date] <= MAX('YourTable'[EndDate])
)
)
Calculate Utilization Percentage:
UtilizationPercentage =
DIVIDE(
[DaysWorked],
[WorkingDays],
0
)
These steps should help you calculate and visualize resource utilization in Power BI.