cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
azjamkat
Frequent Visitor

Run Rate Calculation with a manual weekly update

I have a calculated column that looks at a cost type column and if the value in that colum is Labor or non-engineering labor, it will divide the actual costs for the month by the number of completed days and then multiply that number by the total number of working days in the month to determine a full month factored cost if spending continues at the same rate.   Factored Labor = IF(OR('EOC DATA'[EOC_TYPE_CD] = "LABOR",'EOC DATA'[EOC_TYPE_CD] = "NONENGR"), (('EOC DATA'[Jan EOC ACT]/9)*19)) Currently, I have to change this formula each week manually. Is there a better way? Can I somehow enter the two numbers in a table and have the formula look at that table?

1 ACCEPTED SOLUTION
Greg_Deckler
Super User IV
Super User IV

Probably. I can imagine a date table that has the number of working days per week and per month like:

 

WeekNum,WorkingDaysWeek,WorkingDaysMonth

1,5,19

2,9,19

3,15,19

4,19,19

5,5,17

6,9,17

7,15,17

 

So, 19 working days total in Jan, 17 in Feb let's say. Then you could use things like WEEKNUM(TODAY()) and look up the right values essentially.

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Greg_Deckler
Super User IV
Super User IV

Probably. I can imagine a date table that has the number of working days per week and per month like:

 

WeekNum,WorkingDaysWeek,WorkingDaysMonth

1,5,19

2,9,19

3,15,19

4,19,19

5,5,17

6,9,17

7,15,17

 

So, 19 working days total in Jan, 17 in Feb let's say. Then you could use things like WEEKNUM(TODAY()) and look up the right values essentially.

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Thanks I got this to work by adding the table you suggested. My final formula replaces the /9)*19) portion with:  Calculate(SUM('Factoring Table'[WorkingDaysWeekCM]),(WEEKNUM(TODAY())='Factoring Table'[WeekNum]))*Calculate(SUM('Factoring Table'[WorkingDaysMonthCM]),(WEEKNUM(TODAY())='Factoring Table'[WeekNum])))))

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors