Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
elysesmith12
Regular Visitor

How to Calculate % of Work Days Planned Over Work Year

Hello! 

 

I'm new to Power BI and need assistance calculating the % of a work year planned by an employee.

 

Here's how my data table is set up:

EmployeeProjectStartEndDuration Excl. Holidays/Weekends
TomA8/1/228/1/221
StephB12/13/2212/14/222
SallyC5/2/20225/6/20225
BobD8/24/20228/25/20222
BobE8/22/20228/26/20225

 

As you can see in the table above, 1 person may be responsible for multiple projects that overlap work days. For Bob, he would have a total of 5 work days planned since his projects overlap the same days. How would I write a measure to calculate this?

 

I can't figure out how to only total the distinct calendar dates (I hope I'm explaining this correctly - please help!). 

 

Thank you in advance to those of you who read this and take time to share your expertise!

1 ACCEPTED SOLUTION
selinaz
Resolver II
Resolver II

 Hi @elysesmith12 ,

 

Is this result you want ?

selinaz_0-1660099827035.png

If it is, you can try the following meausre:

 

workdays = CALCULATE(DATEDIFF(SELECTEDVALUE(ProjectsAssigned[Start]),SELECTEDVALUE(ProjectsAssigned[End]),DAY))+1
% Work Year Planned = 'ProjectsAssigned'[workdays]/365.0 * 100

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Best regards.

View solution in original post

3 REPLIES 3
selinaz
Resolver II
Resolver II

 Hi @elysesmith12 ,

 

Is this result you want ?

selinaz_0-1660099827035.png

If it is, you can try the following meausre:

 

workdays = CALCULATE(DATEDIFF(SELECTEDVALUE(ProjectsAssigned[Start]),SELECTEDVALUE(ProjectsAssigned[End]),DAY))+1
% Work Year Planned = 'ProjectsAssigned'[workdays]/365.0 * 100

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Best regards.

technolog
Super User
Super User

Hi!

You can create calculate table:

CalcTable = 

SUMMARIZE( 'Table', 

  'Table'[Employee],

  "@Diff", DATEDIFF('Table'[End], 'Table'[Start], DAYS) / 365.0 * 100

)

Thank you for replying, I tried your suggestion and recieved the following error:

"A single value cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying and aggregation"

 

This is how my formula looks:

% Work Year Planned = SUMMARIZE('ProjectsAssigned',  'UserLookupAssignRef'[Name],  "@Diff", DATEDIFF('ProjectsAssigned'[EndDate], 'ProjectsAssigned'[StartDate], DAY)/365.0 * 100)

 

Any advice on what I need to do to fix?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.