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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Calculate linear forecast based on last known value

Hi there,

 

I'm looking for a solution to calculate a linear forecast for 6 months based on the last known value. Example:

Date (DDMMYYY)Measure
01-01-2021100
02-01-2021105
03-01-2021103
.... 
06-07-2021104
07-07-2021102
ForecastExpected Value
08-07-2021102
... 
07-01-2022
102

 

Thanks in advance.

1 ACCEPTED SOLUTION

Hi, @Anonymous 

Use DAX to write formulas to forecast. I think this is not the difficulty of this problem. The key lies in the calculation logic to get the predicted data. This is more important.
For example: Linear Approximation, Linear Smoothing, least squares method, linear regression, etc.
This is the logic to get the data, so I think you need to find the logic algorithm for the prediction you want.

 

Here is an article about forecasting methods that may be helpful:

Understanding Forecast Levels and Methods 

 

 

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

View solution in original post

8 REPLIES 8
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

It depends on the calculation method you want to use, and then create the DAX formula according to your calculation logic. You can also use a line chart to achieve the purpose of forecasting. There are forecast features in the line chart in the analysis pane.

 

See the links below for more information:

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-analytics-pane#apply-forecasting

https://community.powerbi.com/t5/Community-Blog/Predict-your-milestones-with-forecasting-in-Power-BI-Desktop/ba-p/81687

https://towardsdatascience.com/forecasting-in-power-bi-4cc0b3568443

https://www.youtube.com/watch?v=fLqvaWJtwhQ

https://www.youtube.com/watch?v=XIlPkyyztho

 

 

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

Anonymous
Not applicable

Hi @v-angzheng-msft ,

 

First of all thanks for your reply. I am aware of the forecasting features in the analysis pane, but I'd love to calculate such forecast with DAX so I could use the forecasting data for further calcualtions.

Anyhow, I realized I should've done some more research on what our end goal should be.

 

Thanks for the information nonetheless. I'll look into it.

Hi, @Anonymous 

Use DAX to write formulas to forecast. I think this is not the difficulty of this problem. The key lies in the calculation logic to get the predicted data. This is more important.
For example: Linear Approximation, Linear Smoothing, least squares method, linear regression, etc.
This is the logic to get the data, so I think you need to find the logic algorithm for the prediction you want.

 

Here is an article about forecasting methods that may be helpful:

Understanding Forecast Levels and Methods 

 

 

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

Anonymous
Not applicable

Hi @v-angzheng-msft,

 

Thanks a lot for your help. On a first impression, I think the article is going to help a bunch. I'll be spending some time reading and understanding it. Thanks a lot!

 

Best regards,

 

Mattie

smpa01
Super User
Super User

@Anonymous  DAX does not have a built-in PREDICT or FORECAST algorithm. As long as you know the calculation of a Forecast you want to use, you can play it out with DAX.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Anonymous
Not applicable

@smpa01 Thanks for your reply.

I see, it seems like my lack of knowledge of DAX will be the problem then. Do you have any suggestions on how to calculate such forecast?

amitchandak
Super User
Super User

@Anonymous , usually forecast displayed in the line visual using analytics tab. But incase you need a new column or measure, you need to create a formula

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak Thanks for your reply.

Do you have any idea on how to calculate such forecast with DAX?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors