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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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