Forum Discussion
Running Total Based on Budget Division by Duration
Hi BGB
please try
Forecast Budget running total in Date =
CALCULATE (
SUMX (
VALUES ( 'DateTable'[Month-Year] ),
CALCULATE ( DIVIDE ( SUM ( Sheet1[budget] ), [User Duration Months] ) )
),
ALLSELECTED ( 'DateTable' ),
'DateTable'[Date] <= MAX ( 'DateTable'[Date] )
)
tamerj1 Thanks for replying to this query.
This almost worked, except that the incremental is not on the user ID level. For example, in the picture below, the increment should start from 94.5 and go up each month by that value, as the top visual shows. However, I think this is going up by all the budget given for all users which is why its in thousands already.
I'm guessing there is something we need to add, probably sumx or maxx or even change where we have applied sumx and maxx in the measure.
Thanks for your help so far. Looking forward to hearing from you.
- tamerj14 years agoCommunity Champion
Please try
Forecast Budget running total in Date = CALCULATE ( SUMX ( CROSSJOIN ( VALUES ( 'DateTable'[Month-Year] ), VALUES ( Sheet1[User] ) ), CALCULATE ( DIVIDE ( SUM ( Sheet1[budget] ), [User Duration Months] ) ) ), ALLSELECTED ( 'DateTable' ), 'DateTable'[Date] <= MAX ( 'DateTable'[Date] ) )- BGB4 years agoHelper II
I change your first measure a bit and seems to work to as extent .
Forecast Budget running total in Date =CALCULATE (SUMX (VALUES ( 'DateTable'[Month-Year] ),CALCULATE ( [Forcast Budget To end date] )),ALLSELECTED ( 'DateTable' ),'DateTable'[Date] <= MAX('DateTable'[Date] )
-------This gives me budget expected per month
Forcast Budget To end date =CALCULATE([Forecast Budget],FILTER(Sheet1,(Sheet1[Start Date] <= MAX(DateTable[Date])&& Sheet1[End Date1]> MAX(DateTable[Date]))))----New ResultThe only thing now is, I would like the budget to stop from on the enddate month and not go on till the end of my calendar table. This is so each user have a dynamic end date based on the entered end date.