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

Monthly budget divided by monthly working days

I have a date table where one column is all dates, another column is titled "working days" which has a 1 on business days and a 0 on weekends and holidays.

 

I have a budget table that has 12 rows.  One column is titled date which has rows like this 1/1/2106, 2/1/2016, 3/1/2016.....  Another column is titled "Budgeted Margin $", which has a total monthly budget number.  I want to build a chart like attached.  the red line represents the daily goal to hit the monthly budget and the black line represents the MTD actual.

 

My issue is the red line.  I believe I need to add a column to my date table with something like this  "Daily MTD Budget = sum(budget[Budgeted margin $])/sum(date[working days])............  and the column would of course divide the monthly budget number by the amount of working days in that month and do a running MTD budget number for each working day.

 

I hope this makes since.

 

 

 

Capture.PNG

4 REPLIES 4
v-sihou-msft
Employee
Employee

@Anonymous

 

According to your description, you have monthly budget target, now you want to create MTD daily target. Right?

 

In this scenario, I suggest you add a month column in both tables. Then build relationship on month column (Many to one). 

 

Capture66.PNG

Capture67.PNG

Capture33.PNG

 

In date table, add a calculated column for Current Month Target.

 

Current Month Target = IF('Table'[WorkingDay]=1,RELATED(Table1[MonthlyBudget]),0)

 

Then add a calculated column for Daily Target.

 

Daily Target = 'Table'[Current Month Target]/CALCULATE(SUM('Table'[WorkingDay]),ALLEXCEPT('Table','Table'[Month]))

 

Now you can create a measure to calculate MTD.

 

MTD target = TOTALMTD(SUM('Table'[Daily Target]),'Table'[Date])

The result looks like below:

 

Capture998.PNG

 

Anonymous
Not applicable

Thank you for your help on this.  This is what I have so far.  I'm on the step of adding a calculated column to my DateDimension table.......

Current Month Target = IF('Table'[WorkingDay]=1,RELATED(Table1[MonthlyBudget]),0)

.........but after  ,RELATED(..............it's not allowing me to enter the 'Budget' table.

Capture.PNGCapture.PNG

Anonymous
Not applicable

Does anyone want to take a swing at this? I can also setup a table in our database differently to help get me to my end result of tracking daily budgets.

His formula needs to include the two tables' relationship columns, I had same type of issue with working with two tables and their columns in a formula.  

Mtg Column =
VAR Mtg = CALCULATE(VALUES('STEP Projects'[PM/AppTransitionMtg]), TOPN(1,FILTER('STEP Projects','STEP Projects'[Id]='STEP Resource Planning'[Project Online NameId])))
RETURN
IF(ISBLANK(Mtg),BLANK(),[Start])

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.