Forum Discussion
Forecast Calculation
- 5 years ago
Hi, Gaurav_Lakhotia ;
You mentioned that sum of current year 3 months is sum of sales? if so , you could create a measure as follows:
1.create SalesLY measure.
SaleLY = CALCULATE(SUM('Sales'[Sales]),FILTER(ALL('Sales'),[Year]+1=MAX('Growth Projection'[Year])&&[Month]=MAX('Growth Projection'[Month])))2.create rValue measure.
rValue = VAR _currentq = CALCULATE ( SUM ( 'Sales'[Sales] ), FILTER ( ALL ( 'Sales' ), [Year] = MAX ( 'Growth Projection'[Year] ) && QUARTER ( [Date] ) = QUARTER ( MAX ( 'Growth Projection'[date] ) ) )) VAR _lastq = CALCULATE ( SUM ( 'Sales'[Sales] ), FILTER ( ALL ( 'Sales' ), [Year] + 1 = MAX ( 'Growth Projection'[Year] ) && QUARTER ( [Date] ) = QUARTER ( MAX ( 'Growth Projection'[date] ) ))) RETURN DIVIDE ( _currentq, _lastq )3.create Forecast measure.
Forecast = [SaleLY]*SUM([CIValue])*[rValue]The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Gaurav_Lakhotia ;
You mentioned that sum of current year 3 months is sum of sales? if so , you could create a measure as follows:
1.create SalesLY measure.
SaleLY = CALCULATE(SUM('Sales'[Sales]),FILTER(ALL('Sales'),[Year]+1=MAX('Growth Projection'[Year])&&[Month]=MAX('Growth Projection'[Month])))
2.create rValue measure.
rValue =
VAR _currentq =
CALCULATE (
SUM ( 'Sales'[Sales] ),
FILTER (
ALL ( 'Sales' ),
[Year] = MAX ( 'Growth Projection'[Year] )
&& QUARTER ( [Date] ) = QUARTER ( MAX ( 'Growth Projection'[date] ) ) ))
VAR _lastq =
CALCULATE (
SUM ( 'Sales'[Sales] ),
FILTER (
ALL ( 'Sales' ),
[Year] + 1
= MAX ( 'Growth Projection'[Year] )
&& QUARTER ( [Date] ) = QUARTER ( MAX ( 'Growth Projection'[date] ) )))
RETURN DIVIDE ( _currentq, _lastq )
3.create Forecast measure.
Forecast = [SaleLY]*SUM([CIValue])*[rValue]
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-yalanwu-msft, It works. Thank you so much for the solution!!