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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
jmckentr
Frequent Visitor

Forecast Table - R script

I've been working with Power BI's forecasting abilities for the past week and want to know if there is a R script visual that will take the data generated by a Power BI forecast graph and display it in table form. Power Bi has this feature hidden if you click on 'see data' in the right-top tab.

 

I would like that data on the graph without haveing to look for it. If R script cannot refrence the table or make a table off of it, is there a way to forecast using forecasting in r script and have it display as a table?

 

Thanks in advance, hopefully I have some understanding when it comes to R script.

1 REPLY 1
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @jmckentr,

There is R forecast package to refers to the process of using statistical procedures to predict future values of a time series based on historical trends. In Power BI desktop, you can upload your resource data into table, then add the data as value level, type the following similar R script to create a R visual.

library(forecast)
dataset <- aggregate(Search ~ Date, data = dataset, FUN= sum)

# create a time series based on day of week
ts <- ts(dataset$Search, frequency=7)

# pull out the seasonal, trend, and irregular components from the time series (train the forecast model)
decom <- stl(ts, s.window = "periodic")

# plot the forecast model
plot(decom)


More details, please review and refer to the following articles.

Dynamic Forecasting With Power BI And R
Time Series Analysis using R – forecast package


Best Regards,
Angelia

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.