Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Cumulative Budgets and Allocations

Hi All,

 

I am struggling with calculating the cumulative of monthly allocated budgets derived from a yearly budget.

 

My goal is to compare actuals that I get in on a monthly basis with the corresponding budget on a monthly basis, both on a per month as well as a YTD or cumulative way.

 

My Actuals table "fActuals" looks like this:

YEAR (YYYY) || MONTH (MMM) || ACCOUNT || ACTUAL

 

My Budget Table "fBudget" looks like this:

YEAR (YYYY) || ACCOUNT || BUDGET

 

I calculated Total Budgets via a measure as:

Total Budgets = CALCULATE(sum(fBudget[Budget]),TREATAS(values(fActuals[Year]),fBudget[Year]))
 
I then calculate the Monthly Budgets via a measure as:
Total Budget Per Month = [Total Budgets]/12
 
I succeed to calculate the cumulative Actuals as:
Cumulative Actuals = CALCULATE([Total Actuals],filter(ALLSELECTED(dMonth),dMonth[Number] <= max(dMonth[Number])))
with dMonth a table with all the months and their respective month number
 
But when I use the above to calculate the cumulative it does not give the expected result:
 Cumulative Totals = CALCULATE([Total Budget Per Month],filter(ALLSELECTED(dMonth),dMonth[Number] <= max(dMonth[Number])))
The above formula just results in the monthly budget again, but nothing is added up per month?
 
What am I doing wrong?
 
 Thanks,
 

2 Replies