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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
dullyhope
Regular Visitor

Have PBI selection feed to R-code for a visualisation

I have a few graphs in  PBI dashboard which are all created with R. Each graph shows something about a small subset of a very large dataset which the R code loads in R. I do not load that big raw dataset to PBI as it is massive. I want to be able to use some choice tool e.g. filter, slicer, parameter (?) which the user can choose in PBI. Their choice needs to feed to the R code so it can then filter the large dataset just for that value of the variable/factor. Is this possible??

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi @dullyhope 

You may try to use parameter in power bi.

https://www.mssqltips.com/sqlservertip/4475/using-parameters-in-power-bi/

https://docs.microsoft.com/en-us/power-bi/service-parameters

and for the massive dataset, it's better to use direct query in power bi.

Regards,

Lin

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

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi @dullyhope 

You may try to use parameter in power bi.

https://www.mssqltips.com/sqlservertip/4475/using-parameters-in-power-bi/

https://docs.microsoft.com/en-us/power-bi/service-parameters

and for the massive dataset, it's better to use direct query in power bi.

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @dullyhope ,

 

when you are importing data into Power BI, it is not possible to use slicers to filter data import. If your users are using Power BI Desktop to view the report, they can filter the report in Power Query. If they access the report by Power BI Service, that is not an option.

 

The other alternative would be to use direct query, and let the source do the calculation, instead of within Power BI. But the list of sources which are supported for direct query is not very long.

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors