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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
dkalina97
Helper I
Helper I

Allocate Budget by Date and Type

I have watched YouTube videos and checked topics here but I have been struggling with my budget allocation all week and this is the last item I need to finalize my model.

I have linked my Budget Table to my Sales by Type table. I am attempting to use the Budget Allocation measure below per a tutorial, however, because that product type only had sales on 9 days, it is allocating it over 9 days and thus $7,197 per day, not over the number of days in June, which would make the allocation $2,159.10 per day. Issue 2, because there have not been sales by this product type, the 20,108 in MTD sales, should be compared to $41,022.90 (19 days MTD).

dkalina97_0-1687186260279.png

 



Budget Allocation 1 =
VAR DaysinContext = CALCULATE(COUNTROWS(Dates),all(Dates),values(Dates[Date]))
VAR DaysinMonth = CALCULATE(COUNTROWS(Dates), ALL(Dates), VALUES(Dates[YearMonthnumber]))
VAR CurrentMonth = SELECTEDVALUE(Dates[Month Name])
VAR MonthlyBudgetAmount =
CALCULATE([Total Budget Sales],TREATAS(VALUES(Dates[Month Name]), Budget[Month Name]))

Return
If( OR( HASONEVALUE(Dates[Date]),HASONEVALUE(Dates[YearMonthnumber])),
DIVIDE(DaysinContext, DaysinMonth,0) * MonthlyBudgetAmount,
[Total Budget Sales])

 

2 REPLIES 2
dkalina97
Helper I
Helper I

This will not work as there is not an association between the budget table and the dates table. The budget is linked to the sales type.

amitchandak
Super User
Super User

@dkalina97 , Have you tried something like

 

Power BI Distributing/Allocating the Monthly Target(Convert to Daily Target): Measure ( Daily/MTD): https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Monthly-Target-...

 

Make sure date table has all the dates

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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