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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Add R squared as display value based on actual vs predicted values mapped to line chart

Hi, 

 

Can anyone help me figure out how I can display R squared based on actual vs predicted values?

 

In this visual, I already have a line chart with actual and predicted values in the Y-axis and timestamp in the X-axis.

Based on which timestamp range is selected by the user, I want to update the line chart and also show the corresponding R square value.

 

 

I have tried to use the python scripting visual to claculate R squared, but it seems like this module expects you to only use a plotly or some python visual library something to display it

3 REPLIES 3
lbendlin
Super User
Super User

Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?

Anonymous
Not applicable

Objective : Is to show the end user

1. a line chart with two lines one representing actual value [Y axis] and the other representing a predicted value [Y axis] for a given datetime value [marked on X axis].

2. Along with this, display the R squared value of the Y axis columns mentioned in point 1

I need help with point 2.

What I have tried:

python scripting visual to calculate R squared, but it seems like this module expects you to only use a plotly or some python visual library something to display it and hence cannot just show a value

Final question: Has anyone displayed the R squared value on Power BI dashboards before? If so, how did they achieve it?

 

 

Read about the LINEST function.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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