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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
jen8080
Helper I
Helper I

How to divide hours for a project over start and end dates|| Urgent

I'm trying to figure out how to spread the requested hours for a project over the length of that project with a known start and end date.

Example, I have Project 001, it is 600 hours, and it is a six-month project that is due to release June 2020. 

In this example, Project 001 would add 100 hours to each month from January to June. If Project 002 had 300 hours with the same length and release date, now each month would have 150 hours.

The end goal is to get a forecast of how many hours we expect in each month for all the projects we have to determine the overall capacity demands for the month. So we'd have something like a bar chart that shows the total hours demand for each month based on the projects that will impact that month. 

 

Notes:

1. I have already created a separate date table called "Calendar" with this column 

Calendar = CALENDAR(MIN(report[Estimated Work Start Date]),MAX(report[Estimated Work End Date]))

 

2. Each project can have multiple requested hours (that’s why the same project is listed multiple times)

 

3. I cannot share the data it is sensitive but I have created a sample set below

 

ANY help is VERY appreciated!!

Project  Requested Hours Estimated Work Start Date Estimated Work End Date Number of DaysHoursPerDay
Project 1 4 Wednesday, December 16, 2020 Wednesday, December 23, 2020 80.5
Project 1 20 Wednesday, December 09, 2020 Wednesday, December 23, 2020 151.33
Project 2 12 Wednesday, June 10, 2020 Monday, August 31, 2020 830.14
Project 2 50 Wednesday, June 10, 2020 Monday, August 31, 2020 830.6
Project 2 175 Wednesday, June 10, 2020 Monday, August 31, 2020 832.11
Project 2 692 Wednesday, June 10, 2020 Monday, August 31, 2020 838.34
Project 2 40 Wednesday, June 10, 2020 Monday, August 31, 2020 830.48
Project 2 125 Wednesday, June 10, 2020 Monday, August 31, 2020 831.51
Project 2 20 Wednesday, June 10, 2020 Monday, August 31, 2020 830.24
Project 3 10 Tuesday, March 10, 2020 Thursday, March 31, 2022 7520.01
Project 4 1 Friday, July 31, 2020 Monday, August 31, 2020 320.03
Project 4 6 Monday, July 27, 2020 Monday, August 31, 2020 360.17
Project 4 6 Monday, July 27, 2020 Monday, August 31, 2020 360.17
Project 4 4 Monday, July 27, 2020 Monday, August 31, 2020 360.11
Project 4 19 Monday, February 08, 2021 Friday, February 26, 2021 191
Project 4 14.5 Thursday, October 01, 2020 Friday, January 08, 2021 1000.15
Project 4 25 Thursday, October 01, 2020 Friday, January 08, 2021 1000.25
Project 4 53.5 Thursday, October 01, 2020 Friday, January 08, 2021 1000.54
Project 4 18 Thursday, October 01, 2020 Friday, January 08, 2021 1000.18
Project 4 18 Thursday, October 01, 2020 Friday, January 08, 2021 1000.18
Project 4 19 Monday, February 08, 2021 Friday, February 26, 2021 191
Project 4 66.5 Monday, February 08, 2021 Friday, February 26, 2021 193.5
Project 5 20 Tuesday, January 19, 2021 Monday, March 01, 2021 420.48
Project 6 10 Thursday, October 01, 2020 Friday, October 30, 2020 300.33
Project 6 2 Thursday, October 01, 2020 Friday, October 30, 2020 300.07
Project 6 37.5 Monday, January 27, 2020 Wednesday, June 30, 2021 5210.07
Project 6 198 Tuesday, September 01, 2020 Tuesday, August 31, 2021 3650.54
Project 6 10 Tuesday, September 01, 2020 Saturday, October 31, 2020 610.16
Project 6 16 Thursday, October 01, 2020 Friday, October 30, 2020 300.53
Project 6 12 Thursday, October 01, 2020 Friday, October 30, 2020 300.4
Project 6 1.6 Thursday, October 01, 2020 Friday, October 30, 2020 300.05
Project 6 1 Thursday, October 01, 2020 Friday, October 30, 2020 300.03
Project 7 45 Tuesday, September 01, 2020 Saturday, October 31, 2020 610.74
Project 7 20 Monday, March 09, 2020 Thursday, April 30, 2020 530.38
Project 7 110 Tuesday, February 25, 2020 Saturday, April 30, 2022 7960.14
Project 7 60 Monday, March 09, 2020 Thursday, April 30, 2020 531.13
Project 7 23 Monday, March 09, 2020 Thursday, April 30, 2020 530.43
Project 7 35 Monday, March 09, 2020 Thursday, April 30, 2020 530.66
Project 7 16 Monday, March 09, 2020 Thursday, April 30, 2020 530.3
Project 7 2 Monday, February 17, 2020 Tuesday, March 31, 2020 440.05
Project 7 53 Monday, March 02, 2020 Sunday, July 31, 2022 8820.06
Project 7 2 Saturday, February 01, 2020 Saturday, February 29, 2020 290.07
Project 7 5 Monday, February 17, 2020 Tuesday, March 31, 2020 440.11
Project 7 5 Monday, February 17, 2020 Tuesday, March 31, 2020 440.11
Project 7 10 Saturday, February 01, 2020 Saturday, February 29, 2020 290.34
Project 7 1.5 Monday, March 09, 2020 Thursday, April 30, 2020 530.03
Project 7 4 Monday, March 09, 2020 Thursday, April 30, 2020 530.08
Project 7 120 Tuesday, September 01, 2020 Saturday, October 31, 2020 611.97
Project 8 3 Monday, September 21, 2020 Friday, October 30, 2020 400.08
Project 8 19 Monday, September 21, 2020 Friday, October 30, 2020 400.48
Project 8 19 Thursday, October 01, 2020 Friday, October 30, 2020 300.63
Project 8 15 Monday, September 21, 2020 Friday, October 30, 2020 400.38
Project 8 16 Friday, October 30, 2020 Thursday, December 31, 2020 630.25
Project 8 30 Wednesday, September 30, 2020 Friday, October 30, 2020 310.97
Project 8 10 Monday, September 28, 2020 Friday, October 30, 2020 330.3
Project 8 15 Monday, September 21, 2020 Friday, October 30, 2020 400.38
Project 8 24 Monday, September 21, 2020 Friday, October 30, 2020 400.6
Project 8 6 Wednesday, September 30, 2020 Friday, October 30, 2020 310.19
Project 9 10 Monday, June 22, 2020 Friday, August 20, 2021 4250.02
Project 9 21 Monday, March 09, 2020 Thursday, September 30, 2021 5710.04
Project 9 7 Monday, February 10, 2020 Friday, February 28, 2020 190.37
Project 9 2 Monday, June 22, 2020 Friday, August 20, 2021 4250
Project 10 2.5 Monday, August 17, 2020 Monday, August 31, 2020 150.17
Project 10 10 Monday, August 17, 2020 Monday, August 31, 2020 150.67
Project 10 20 Monday, August 17, 2020 Monday, August 31, 2020 151.33
Project 10 2.5 Monday, August 17, 2020 Monday, August 31, 2020 150.17
Project 10 2 Thursday, May 07, 2020 Thursday, May 14, 2020 80.25
Project 10 12 Thursday, May 07, 2020 Thursday, May 14, 2020 81.5
Project 10 4 Thursday, May 07, 2020 Thursday, May 14, 2020 80.5
Project 10 1 Thursday, May 07, 2020 Thursday, May 14, 2020 80.13
Project 10 5 Thursday, May 07, 2020 Thursday, May 14, 2020 80.63
Project 10 0.5 Monday, March 30, 2020 Friday, April 03, 2020 50.1
Project 10 8 Thursday, May 07, 2020 Thursday, May 14, 2020 81
Project 10 18 Friday, March 27, 2020 Friday, April 03, 2020 82.25
Project 10 3 Friday, March 27, 2020 Friday, April 03, 2020 80.38
Project 10 30 Thursday, May 07, 2020 Thursday, May 14, 2020 83.75
Project 10 3 Friday, March 27, 2020 Friday, April 03, 2020 80.38
Project 10 5 Monday, March 30, 2020 Friday, April 03, 2020 51
Project 10 1 Friday, March 27, 2020 Friday, April 03, 2020 80.13
Project 10 8 Friday, March 27, 2020 Friday, April 03, 2020 81
Project 10 1 Friday, March 27, 2020 Friday, April 03, 2020 80.13
Project 10 6 Monday, August 17, 2020 Monday, August 31, 2020 150.4
Project 10 6 Friday, March 27, 2020 Friday, April 03, 2020 80.75
Project 10 4 Monday, August 17, 2020 Monday, August 31, 2020 150.27
Project 10 4 Wednesday, March 25, 2020 Friday, March 27, 2020 31.33
Project 10 30 Thursday, May 07, 2020 Thursday, May 14, 2020 83.75
Project 10 2 Thursday, May 07, 2020 Thursday, May 14, 2020 80.25
Project 10 2 Thursday, May 07, 2020 Thursday, May 14, 2020 80.25
Project 10 1 Thursday, May 07, 2020 Thursday, May 14, 2020 80.13

 

6 REPLIES 6
v-deddai1-msft
Community Support
Community Support

Hi @jen8080 ,

 

I don't think it will work if we don't summary your data by project. Because we don't have any defined column  to

 distinguish the different requests in the same study. 

 

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

 

Best Regards,

Dedmon Dai

v-deddai1-msft
Community Support
Community Support

Hi @jen8080 ,

 

You can create a summary table :

 

Summary = ADDCOLUMNS(SUMMARIZE(Projects,Projects[Project ],"_Requested Hours",SUM(Projects[Requested Hours]),"_Estimated Work Start Date",MIN(Projects[Estimated Work Start Date]),"_Estimated Work End Date",MAX(Projects[Estimated Work End Date])),"hourspermonth",CALCULATE(DIVIDE(SUM(Projects[Requested Hours]), DATEDIFF( MIN(Projects[Estimated Work Start Date]),MAX(Projects[Estimated Work End Date]),MONTH) +1)))

Capture3.PNG

 

Then create a monthyear column in calendar table:

MONTHYEAR = MONTH('Calendar'[Date])/10+YEAR('Calendar'[Date]) 

 At last you can use the following measure:

Measure = SUMX(VALUES('Calendar'[MONTHYEAR]),CALCULATE(SUM('Summary'[hourspermonth]),FILTER('Summary',var a = 'Summary'[_Estimated Work Start Date] var b = 'Summary'[_Estimated Work End Date]  return MONTH(a)/10+YEAR(a)<= MAX('Calendar'[MONTHYEAR])&&MONTH(b)/10+YEAR(b)>= MAX('Calendar'[MONTHYEAR]))))

 

Capture4.PNG

 

For more details, please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EfdPWVTD_mBLt1lJjS...

 

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

 

Best Regards,

Dedmon Dai

Hi @v-deddai1-msft,

Is there a measure to span this based on days, but then still review it in the month format? Also how would I account if an estimated work start date started mid month? Is there a way to make the daily or monthly amount adjusted based on when the work starts or ends in the month? Thanks for the help!!

 

Hi @jen8080 ,

 

Just based on your sample data, I can't write an efficient dax formula to work out it. 

 

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

 

Best Regards,

Dedmon Dai

Hello @v-deddai1-msft ,

 

We are close but I am getting slightly different results then expected. I am thinking this is because the data is summed by project and then by min and max estimated dates. I need it to be eveluated row by row and not all summed together by study, the reason is because the dates can be very different by request even though they might for the same study but the time frame is not the same. So when taking the min and max date you are expanding requested hours out over the whole length vs the defined time (estimated work start and work end date). Is there anyway to eleveate it row by row based on each rows dates instead of summing by project by project?

parry2k
Super User
Super User

@jen8080 solution attached, you can tweak it as per your needs.

 

Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.