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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jen8080
Helper I
Helper I

Spread value across time between 2 dates

Hello-

 

I need to be able to determine the number of months betwen the start and end date and show how many employees I need to per month to fill these requested hours. The requested hours should be distrbuted evenly across the start and end dates. 

Each employee is expected to work 50 hours lets say. 

 

Here is just a sample of data to help:

Project IDRecord EntryRequested HoursWork End DateWork Start Date
Project 1144664Wednesday, December 23, 2020Wednesday, December 16, 2020
Project 11446620Wednesday, December 23, 2020Wednesday, December 09, 2020
Project 21399012Monday, August 31, 2020Wednesday, June 10, 2020
Project 21399050Monday, August 31, 2020Wednesday, June 10, 2020
Project 213990175Monday, August 31, 2020Wednesday, June 10, 2020
Project 213990692Monday, August 31, 2020Wednesday, June 10, 2020
Project 21399040Monday, August 31, 2020Wednesday, June 10, 2020
Project 213990125Monday, August 31, 2020Wednesday, June 10, 2020
Project 21399020Monday, August 31, 2020Wednesday, June 10, 2020
Project 31358610Thursday, March 31, 2022Tuesday, March 10, 2020
Project 4141251Monday, August 31, 2020Friday, July 31, 2020
Project 4141256Monday, August 31, 2020Monday, July 27, 2020
Project 4141256Monday, August 31, 2020Monday, July 27, 2020
Project 4141254Monday, August 31, 2020Monday, July 27, 2020
Project 41456119Friday, February 26, 2021Monday, February 08, 2021
Project 41425814.5Friday, January 08, 2021Thursday, October 01, 2020
Project 41425825Friday, January 08, 2021Thursday, October 01, 2020
Project 41425853.5Friday, January 08, 2021Thursday, October 01, 2020
Project 41425818Friday, January 08, 2021Thursday, October 01, 2020
Project 41425818Friday, January 08, 2021Thursday, October 01, 2020
Project 41456119Friday, February 26, 2021Monday, February 08, 2021
Project 41456166.5Friday, February 26, 2021Monday, February 08, 2021

 

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

  1. Why are there multiple rows for the same Project ID and Record Entry combination?
  2. As an example, for the first 2 rows, how would you calculate the number of months?
  3. Also, for project 4 and record entry 14258, how would you calculate the number of months?

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

1. This is just a sample sample of a much larger confidential dataset. Each study can have several requests for more hours to be added.

2.Again small  sample of the acutal dataset so we could use days if months aren't possible.

3. above is also applicable for this.

Anonymous
Not applicable

Hi @jen8080,

I still not so clear for your scenario, can you please share more details about these?

How to Get Your Question Answered Quickly 
#1, Did these request hours means the daily works hour that assigns in the date ranges?

#2, For the records with the same 'project id' and 'Record Entry', did these need to be summarized or calculate standalone?

#3, Since you are talking about working hours, how the weekend(workday range) configured in your date range?

Regards,
Xiaoxin Sheng

Anonymous
Not applicable

Hi @jen8080,

It seems like a common multiple date range analysis requirement, please take a look at the following links if they meet your scenario:

Spread revenue across period based on start and end date, slice and dase this using different dates 

Before You Post, Read This#“start date” and “end date” 

Regards,

Xiaoxin Sheng

xMikeDx
Frequent Visitor

your time req in months is not going to fly when you are looking at partial months especially at both ends.

i believe you need to use datediff to get the count of days filter out any non workdays then determin how many hours per day each row is projected to meet your est. 50.

 

this is psudeo code.

measure =: 

var __hours = 50

var __dayrange = calculate(datediff (facttable[start_date], facttable[end_date], Day),'datetable'[isweekend]=false)

var __result = divide( __dayrange, __hours)

return __result

 

something like this

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors