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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Guipedroso
Frequent Visitor

Ahead Moving Average - Circle Reference?

Hello Guys,

 

I am creating a kind of "Sales Forecast" model. To plan ahead, i am using the 6months average of the Actual Sales ahead. In Excel is quite simple, but how to implement in DAX?

To better explaing, i am adding an image with the Actual Sales until September 2017, and how i want calculate the months ahead. Does anyone has any clue?

 

Thank you so much

 

Sales Forecast 6MMA.png

5 REPLIES 5
v-chuncz-msft
Community Support
Community Support

@Guipedroso,

 

Based on my experience, you may try to invoke a recursive custom function in Query Editor.

https://msdn.microsoft.com/en-us/library/mt185361.aspx

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hello @v-chuncz-msft! thank you so much for your time ...

I would like to do it using DAX formulas, because i will use other Dimensions do Categorize the forecast (Products, Customers etc)...

 

@Guipedroso,

 

As far as I know, there is no elegant way.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chuncz-msft yeah, i tried those "no elegant" ways, but the model is colapsing after the 6 month calculation. Too much "IF"s
Thats so annoying this situation for circular reference limitation...

 

Cheers

@Guipedroso,

 

It's a mathematical problem of finding the general formula of recurrent sequence.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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