cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

R script with filtered dataset

I'm just getting started with R scripting in Power BI. I know that I can create a script visual using any existing field by dragging that field onto the visual, after which it will automatically be loaded into a data frame.

 

My expectation would be that, when the field is filtered at the page or visual level in Power BI, the filtered data set would get loaded to the data frame. In other words, I would expect that the script would respond dynamically to filtering.

 

Is this not the case? It is not working for me, and I cannot tell whether it is user error or just not available.

 

My ultimate goal is to generate a pivot table where I run a simple regression on an increasingly larger data set, and show the "development" of the regression parameter estimates (the rows) over the time frames (the columns). I have seen one person who kindly posted a DAX measure to run simple linear regression, which I suspect would work for this simpler problem. However, I am trying to do this in R because I would like to move on to more complicated analyses, and DAX just isn't built for that.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User V
Super User V

Re: R script with filtered dataset

You don't need to limit yourself to add columns to the R script visual. You can add measures too. That should give you the flexibility to dynamically filter your "existing field".

View solution in original post

1 REPLY 1
Highlighted
Super User V
Super User V

Re: R script with filtered dataset

You don't need to limit yourself to add columns to the R script visual. You can add measures too. That should give you the flexibility to dynamically filter your "existing field".

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors