Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Gaurav_Lakhotia
Helper III
Helper III

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 = Last year same month sales

CIValue = we have this column in the growth projection table

rValue = sum of current year 3 months/sum of last year 3 months
Let's say we are in Aug2019, the sum of August 2020, July 2020 & June 2020 divided by the sum of August 2019, July 2019 & June 2019.

We have to calculate the forecast for a year from the current month. Let's say we are in August 2020 then it should calculate forecast till August 2021.

 

Here is the file with the sample data Forecast Test.

 

Thanks

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

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:

vyalanwumsft_0-1630551943207.png

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.

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

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:

vyalanwumsft_0-1630551943207.png

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!!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.