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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
luismolle
Regular Visitor

Forecast Last 6 Months using the last forecast

Hi! Im struggling with forecasting in Power BI.
I have a table with dates, Attributes and amounts. My idea is to calculate the amount for the nexts months based on the last 6 values I have. For the next the calc should consider the 5 actual months and the forecast done, for example:

luismolle_0-1719263650369.png

(dummy data)

in this case, april should be the average of the last six months, and May should be the average of last five filled and April that was just calculated.

1 REPLY 1
v-zhouwen-msft
Community Support
Community Support

Hi @luismolle ,

Regarding your question, this is an iterative calculation. That is, the value of the current row is based on the result of the calculation of the previous row. This cannot be achieved in DAX. It is recommended that you use Power Query M code.

List.Accumulate - PowerQuery M | Microsoft Learn

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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