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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-jayw-msft
Community Support
Community Support

Hi @jruf ,

 

Please share more details.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 .

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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