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 August 31st. Request your voucher.

Reply
keyboardgreen
Frequent Visitor

Calculating Prediction Intervals in Power BI

I have a set of measures that generate a quadratic regression model for a set of data. The final piece I'm looking for is a prediction/confidence interval around each predicted term. Ideally, this interval would be the same or at least close to what is generated when performing such an analysis in R.

 

Thanks!

3 REPLIES 3
Anonymous
Not applicable

Hi @keyboardgreen ,

 

Based on the information you provided, since Power BI does not inherently support prediction intervals, you will need to use DAX to calculate these intervals.

 

You can use Power BI visual objects such as line plots with confidence intervals or custom visual objects that allow error lines to represent prediction intervals around a regression line.

 

You might also consider running an R script directly in Power BI to generate the intervals. You can run R scripts in Power BI using the R Script Data Source option or by adding R visual objects to reports. For more information about running R scripts in Power BI, see the official Microsoft documentation:

Run R scripts in Power BI Desktop - Power BI | Microsoft Learn

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Daniel29195
Super User
Super User

im not sure if you can create a quadratic regression with dax. 

you can check this article from sqlbi if maybe it can help you. 

https://www.sqlbi.com/articles/implementing-linear-regression-in-power-bi/

 

another thing to note, you can create visuals with python code. 

Daniel29195_0-1705436353977.png

 

so maybe this is more appropriate for you ? 

 

 

I've definitely performed the regression proper, as I've confirmed using R that my calculations of the coefficients are correct. The issue I'm having is with calculating the prediction interval. There are DAX formulas such as CONFIDENCE.T that supposedly provide the necessary pieces to calculate upper/lower bounds on a prediction, but I've had no success emulating what is output from R.

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.