Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Not applicable

Fill forecast period only off next month value

Hello smart people,


New to Power BI and trawling a tonne of useful content here.


I've created a simple forecast as shown in table below based on avg. last 3 months, and wish to fill the entire year's projection based on just next month's forecast value. 


So for example, next month (Feb-20)  is forecast 228, but the months after this decay to zero based on the 3 month lookback. 


How would I create the final column to be cumulative dynamically  as we roll through the year (i.e. actual YTD + fill down next month forecast)? 


My Excel mind is considering an IF formula based on a blank value in Actual but I suspect I'm way off track!


MonthActualForecast (3 mnth avg.)Required MoMRequired cumulative
Feb-20 228228478
Mar-20 140228706
Apr-20 83228934
May-20  2281162
Jun-20  2281390
Jul-20  2281618
Aug-20  2281846
Sep-20  2282074
Oct-20  2282302
Nov-20  2282530
Dec-20  2282758


Thanks in advance

Solution Sage
Solution Sage

Your Excel mind is part of the way there.

If you are saying that you want to fill down the last forecast based on having 3 previous month's data, then you could use something like COUNTAX() which counts non blank rows. If you count the nonblank rows in the last 3 months of actuals and the count does not = 3, then know you have gone past your actual data

you can then use LASTNONBLANK to find the last month that had actuals and calcualte the 3 month average based on the month that follows that last month

and that will fill down the last average that had 3 previous months to calculate on

The big difference from EXCEL is that DAX has no native concept of the order of the rows, so you can refer directly to values in the next row, or the previous rows, or the previous 3 rows...
You can get a reference to the current row context and get the date value for example, and then use that date value to calculate the COUNTAX over the previous 3 months...

So the various tricks amount to thinking about posing DAX "questions" in terms of column values.
If you'd like help with the DAX then perhaps you could post the measure or calculated column you're using to calculate the the forecast now...

Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!

Join the conversation at We Talk BI find out more about me at Slow BI

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors