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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AlexDawson1111
New Member

Calculate Hours Per Week

Hi,

 

I am looking for the best way to calculate hours required per week by week end date. The scenario is as follows:-

 

1) I have a Task Number, Task Start Date and a Task End Date. The task has effort hours. I want to calculate the hours of effort required per week (by week end date).

 

For example task number 1 requires 1000 hours effort. Per week end date how many hours do i need per week for this task if the start date is 01/01/2022 and the task end date is 01/03/2022. The week end date will always be a sunday.

 

Any help would be apprechiated.

 

Thanks

2 REPLIES 2
amitchandak
Super User
Super User

@AlexDawson1111 , a new table (Assumed you have column like task amount and task id)


var _Tab =
filter(

Addcolumns(generate(Task, calendar([Start Date], [End Date]) ), "Week end", [Date]+ 7-1*WEEKDAY([Date],2) -1), [End Date] =[Date])
return
Addcolumns(_tab, "Amount", [Task Amount]/ countx(filter(_tab, [Task id] = earlier([Task id])),[Task id]) )

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi,

 

Thanks for your assistance.

 

Here is a data example:-

 

Fact_Table Data containing the Start Date and End Date and Hours

 

Fact_TableFact_Table

 

dim_Calender - This contains the date and calender ID, each task has a related calender as each task has different working days and hours etc

 

dim_Calendardim_Calendar

 

model:-

 

data modeldata model

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.