Forum Discussion
mixue100
4 years agoFrequent Visitor
Calculating future months using latest actuals based on expected growth
Hi I am stuck with this and would need help on the below. Month YTD Actuals Expected growth for next mont, based on actuals from Current month Expected actuals (forecasted actuals) A...
- 4 years ago
Hi mixue100 ,
this is the measure for the forecasts. Please hit the thumbs up & mark it as a solution if it helps you. Thanks.
Forecasts =VAR LastActualMonth =CALCULATE (MAX ( 'Table'[Month] ),ALL ( 'Table' ),'Table'[YTD Actuals] <> BLANK ())VAR LastActual =CALCULATE (SUM ( 'Table'[YTD Actuals] ),ALL ( 'Table' ),'Table'[Month] = LastActualMonth)VAR CurrentMonth = MAX('Table'[Month])VAR Product_Growth =CALCULATE(PRODUCTX(FILTER('Table','Table'[YTD Actuals]=BLANK() && 'Table'[Month] <= CurrentMonth),'Table'[Expected growth] + 1),ALL())RETURNProduct_Growth * LastActualAnd here there is the link to the pbi file:
v-jingzhang
Community Support
4 years agoHi mixue100
If the expected growth rate is a fixed value, this is possible. You can try the following measure. For example, the growth rate is 10%.
If the growth rate is not fixed, just like your sample, I cannot think of a solution yet. The difficulty is at the highlighted _forecast part. The difficulty is that in DAX, the measure is evaluated on every row individually. It cannot get the measure value from its previous row.
Best Regards,
Community Support Team _ Jing