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
jruf
Frequent Visitor

Issue filtering an R script

I'm trying to do the following using an R visual in power bi:

  • Build a simple predictive model of a variable over time. The model needs to be built in R.
  • Plot the predictions from the model. Predictions are on the y axis, date is on the x axis.
  • Add a filter for date so that I can filter the plot BUT with the caveat that the predictions are still made using the model fitted on the whole dataset. In other words, adjusting the 'date' filter should change the x axis of the plot, but not the values plotted on the y axis (the predictions).

Is there a way to do this? As far as I can tell whenever I adjust the date filter the whole model is refitted based on the values of the filter. E.g. if the dataset starts at 1/1/2015 and ends at 1/1/2022, if I slide the filter to only plot results between 1/1/2021 and 1/1/2022 the model should still be fitted on the data since 1/1/2015. I havent found a way to do this.

 

Much appreciated

1 REPLY 1
Anonymous
Not applicable

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.