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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
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
Oct-19383337  
Nov-19263356  
Dec-19171320  
Jan-20250272  
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

1 REPLY 1
kentyler
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

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors