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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
Super User

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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.