Skip to content

Allocation of Annual Budget (by Monthly weightings given). Comparison with Total Actual Sales

>> Download the sample (Power BI)

This sample shows how:

(i) Actual Total Sales compare to
(ii) A pre-determined budget (where the budget has been allocated monthly using a monthly percentage weighting)

Measures - Sales, Budget, and Calendar Time

Section titled “Measures - Sales, Budget, and Calendar Time”
Actuals vs Budget w/Weightings =
[Total Sales] - [Budget Allocation w/Weightings]
Budget Allocation w/Weightings =
VAR DaysinDateContext =
COUNTROWS ( Calendar_Table ) //Finds how many dates in date context
VAR DaysinPeriod =
CALCULATE (
COUNTROWS ( Calendar_Table ),
ALL ( Calendar_Table ),
VALUES ( Calendar_Table[Month & Year] )
) //Finds how many dates within each Month
VAR Seasonality = [Seasonality Measure]
VAR TotalBudget =
LOOKUPVALUE ( Budget_Table[Annual Budget], Budget_Table[Year], [Selected Year] ) * Seasonality //Sums up the Total Budget
RETURN
( DaysinDateContext / DaysinPeriod ) * TotalBudget
//Retrieves Budget Allocation over any date context
Current Month =
IF (
ISFILTERED ( Calendar_Table[Date].[Month] ),
VALUES ( Calendar_Table[Date].[Month] ),
FORMAT ( LASTDATE ( Calendar_Table[Date] ), "MMMM" )
)
Current Month No =
IF (
ISFILTERED ( Calendar_Table[Date].[Month] ),
VALUES ( Calendar_Table[Date].[MonthNo] ),
MONTH ( LASTDATE ( Calendar_Table[Date] ) )
)
Seasonality Measure =
IF (
ISFILTERED ( Calendar_Table[Date].[Month] ),
AVERAGEX (
FILTER (
'Budget Weightings',
'Budget Weightings'[Month Name] = [Current Month]
),
'Budget Weightings'[Monthly Weighting]
),
IF (
ISFILTERED ( Calendar_Table[Date].[Quarter] ),
AVERAGEX (
FILTER (
'Budget Weightings',
'Budget Weightings'[Month No] = [Current Month No]
),
'Budget Weightings'[Monthly Weighting]
)
+ AVERAGEX (
FILTER (
'Budget Weightings',
'Budget Weightings'[Month No]
= [Current Month No] - 1
),
'Budget Weightings'[Monthly Weighting]
)
+ AVERAGEX (
FILTER (
'Budget Weightings',
'Budget Weightings'[Month No]
= [Current Month No] - 2
),
'Budget Weightings'[Monthly Weighting]
),
SUMX ( 'Budget Weightings', 'Budget Weightings'[Monthly Weighting] )
)
)
Selected Year =
VAR selectedyear =
SELECTEDVALUE ( Calendar_Table[Year] )
RETURN
IF ( ISBLANK ( selectedyear ), "Multiple Years", selectedyear )
Total Sales =
SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )
Calendar_Table =
GENERATE (
CALENDAR ( DATE ( 2017, 1, 1 ), DATE ( 2019, 12, 31 ) ),
VAR currentDay = [Date]
VAR Day =
DAY ( currentDay )
VAR Month =
MONTH ( currentDay )
VAR Year =
YEAR ( currentDay )
RETURN
ROW ( "Day", day, "Month", month, "Year", year )
)