Forum Discussion

Gaurav_Lakhotia's avatar
Gaurav_Lakhotia
Icon for Helper III rankHelper III
5 years ago
Solved

Forecast Calculation

Hello all, I need your help in calculating the forward forecast for sales. I have monthly sales data. Here is the equation for forecast calculation, Forecast = SalesLY * CIValue * rValue SalesLY =...
  • v-yalanwu-msft's avatar
    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.