cancel
Showing results for
Did you mean: 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  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.

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

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

Proud to be a Super User!

2 REPLIES 2  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.

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

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

Proud to be a Super User! Frequent Visitor

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]))))) Announcements #### Welcome to the User Group Public Preview  