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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
glichinsky61
New Member

exponential trend analysis for stock data in Power BI

I am trying to do a freelance project for a financial advisor and I desperately need one-on-one help/advice. I have 4 months of experience working as a Power BI Developer doing API inventory/KPIs, after spending about 2 weeks of learning on Udemy, and I have some exposure to coding, so my knowledge is pretty minimal.
My client has an intricate excel workbook that is pulling daily stock data using excel's built-in stock market functionality. They are using exponential regression to find the slope and y intercept of the close price over date. I am trying to recreate his work in Power BI but I just cant get the right outcome. I really need someone with experience to help me out with this or to see if it is something that is even possible.

1 ACCEPTED SOLUTION

Hi @glichinsky61 ,

Thanks for reaching out to the Microsoft fabric community forum. 

 

I’ve tested this with your dataset and got the output as below in Power BI. The approach is to log-transform the Close price, perform a linear regression on DateIndex vs LogClose, and then convert the slope/intercept back to exponential form.

To help you get started, I’ve attached a PBIX file. It includes:

Your sample data
 Log transformation & date index
 Regression logic to calculate the exponential growth parameters
Predicted exponential trend line plotted against actual closing price.

vmenakakota_0-1762493729817.png

If I misunderstand your needs or you still have problems on it, please feel free to let us know.   

Best Regards, 
Community Support Team  

View solution in original post

5 REPLIES 5
AnkitaaMishra
Super User
Super User

Hi @glichinsky61 , Thanks for reaching out!
To assist properly, we’ll need a small sample dataset and details on the Excel exponential regression formula. Community members can then help determine how to replicate the logic in Power BI.

Alright, here is a sample data table:

DATEOPENLOWHIGHCLOSE
1/29/199343.968843.7543.968843.9375
2/1/199343.968843.968844.2544.25
2/2/199344.218844.12544.37544.3438
2/3/199344.406344.37544.843844.8125
2/4/199344.968844.87545.093845
2/5/199344.968844.718845.062544.9688
2/8/199344.968844.906345.12544.9688
2/9/199344.812544.562544.812544.6563
2/10/199344.656344.531344.7544.7188

The formula to calculate the slope:
=INDEX(LOGEST($E$2:INDEX(E:E,COUNTA(E:E)),$A$2:INDEX(A:A,COUNTA(A:A)),),1)-1
Formula for the y intercept

=INDEX(LOGEST($E$2:INDEX(E:E,COUNTA(E:E)),$A$2:INDEX(A:A,COUNTA(A:A)),),2)
Column E is the CLOSE PRICE and A is the DATE

Hi @glichinsky61 ,

Thanks for reaching out to the Microsoft fabric community forum. 

 

I’ve tested this with your dataset and got the output as below in Power BI. The approach is to log-transform the Close price, perform a linear regression on DateIndex vs LogClose, and then convert the slope/intercept back to exponential form.

To help you get started, I’ve attached a PBIX file. It includes:

Your sample data
 Log transformation & date index
 Regression logic to calculate the exponential growth parameters
Predicted exponential trend line plotted against actual closing price.

vmenakakota_0-1762493729817.png

If I misunderstand your needs or you still have problems on it, please feel free to let us know.   

Best Regards, 
Community Support Team  

Hi @glichinsky61 ,

I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you 

 

Best Regards, 
Community Support Team  

Hi @glichinsky61 ,

I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you 

 

Best Regards, 
Community Support Team

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.