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
Anonymous
Not applicable

Using a user sliced table to plot a graph through R

I am trying to mirror the 'react' capablity of R Shiny in Power BI. Right now I have several slicers that enables a selection of a desired subset of the intial table loaded into Power BI. My  intention is to let the user slice the main table as needed and when done, on the click of a button, the altered table, created through slicing, is captured and an R script is run to make a plot of the desired table. I have done some searches online but I have not been able to find a way to capture a sliced table so that I can send it to an R script to be plotted. I know a plot itself can have slicers added to it, but in this situation, my challenge is different. Any help would be greatly appreciated. 

2 REPLIES 2
TeigeGao
Solution Sage
Solution Sage

Hi @Anonymous ,

According to your description, my understanding is that you want to filter the R visual with the outside slicer, based on my test, we can't do it since now.

Here is an idea opened in idea forum, I would suggest you vote it: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/33721843-allow-interactive-functions-like-slicer-in-r-vis

Best Regards,

Teige

Anonymous
Not applicable

Hi @TeigeGao,
First of all, thank you very much for your assistance on the last question as well as this question.  What I want is to not sliced the R visual itself but rather capture a sliced table in realtime. So for instance, if we have 3 catergories; age, occupation, and area, then the user can slice to find someone who is forty, a writer, and living in France. I have already accomplished this bit. I am able to slice the loaded datatable the way I please. But now what I want is to be able to base my R graph solely on what has been sliced. So when the slicing happens, I should see the R visual change from showing everyone of all ages, occupations, and regions to all the French writers who are 40. If only there was a way to capture the resulting table each time a slicing input changes, then I can send the captured table into R and get the visual. Thanks!

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.