Forum Discussion
Cumulative Budget Error
- 6 years ago
Hi CraigMFuso ,
Have you tried to split the measure of Cumulative Budgets?
Measure = VAR __Table = SUMMARIZE ( 'Calendar', 'Calendar'[Date], "Budgets", [Budget Allocation] ) RETURN SUMX ( __Table, [Budgets] )Cumulative Budgets = CALCULATE ( [Measure], FILTER ( ALL( 'Calendar' ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) ) )Because of the measure of Total Dealer Budgets, I can't reproduce your problem. If the formulas above can't work, can you please share the formula of Total Dealer Budgets?
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Someone else might be able to look at that and spot the error, but I'd need something to play with, and I cannot copy images of tables and measures into Power BI. Put measures in the code boxes (the </> icon in the toolbar) and tables via below link for sample data.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
Hi, hope this helps.
Budget Allocation =
VAR MonthDays = CALCULATE( COUNTROWS( 'Calendar' ), ALL( 'Calendar'[Date] ), VALUES( 'Calendar'[Month & Year] ) )
VAR DailyBudget = CALCULATE( [Total Dealer Budgets], ALL( 'Calendar'[Date] ), VALUES( 'Calendar'[Month & Year] ) )
RETURN
IF( ISFILTERED( 'Calendar'[Date] ),
DIVIDE( DailyBudget, MonthDays, 0 ),
[Total Dealer Budgets] )
Cumulative Budgets = CALCULATE(
SUMX( SUMMARIZE( 'Calendar', 'Calendar'[Date], "Budgets", [Budget Allocation] ), [Budgets] ),
FILTER( ALLSELECTED( 'Calendar' ),
'Calendar'[Date] <= MAX( 'Calendar'[Date] )))
Results example:
| Date | Budget Allocation | Cumulative Budgets (current formula with issue) | Cumulative Budgets (expected result) |
| 01/01/20 | 12,654.84 | 392,300.16 | 12,654.84 |
| 02/01/20 | 12,654.84 | 784,600.32 | 25,309.68 |
| 03/01/20 | 12,654.84 | 1,176,900.48 | 37,964.52 |
- v-xuding-msft6 years agoCommunity Support
Hi CraigMFuso ,
Have you tried to split the measure of Cumulative Budgets?
Measure = VAR __Table = SUMMARIZE ( 'Calendar', 'Calendar'[Date], "Budgets", [Budget Allocation] ) RETURN SUMX ( __Table, [Budgets] )Cumulative Budgets = CALCULATE ( [Measure], FILTER ( ALL( 'Calendar' ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) ) )Because of the measure of Total Dealer Budgets, I can't reproduce your problem. If the formulas above can't work, can you please share the formula of Total Dealer Budgets?
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.