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.
What is the best way to pass a parameter into an R visual? One solution that works but seems very inefficient is to take every possible value of the parameter and create a copy of your dataset for every value, with the parameter's value in an extra column. Then you can create a slicer on that column. Therefore if you have 10 possible values for your parameter, your resulting dataset passed into R is 10 times the original size. If you have three parameters with 20 options each, your resulting dataset is 8000 times the original size. If your parameter is continuous, this is obviously impossible.
A better solution might exist if there was the ability to pass in multiple datasets into an R visual, but as far as my searches go, this is not possible.
Is there a better way to pass in a parameter without need to mash it into the dataset that is being passed into R?
Hi All,
Is this issue resolved and can we use Dynamic slicer\Parameters in R or Python visual?
I was looking into this recently too. I would also like the capability to pass multiple slicers/parameters into the R visualisation without the need to include all of the slicer values within the data (and consequently having to magnify the data size to accomodate all of the different slicer values). I don't believe there is any easy fix to this at the moment.
I came up with a partial solution by inputting the data from with the R code itself (via the read.csv command). The data that is passed to the R visualisation are the slicer values. This means you need to create a table with all of the different slicer variations in Power BI. This approach reduces the overhead of incorporating all of the different slicer variations into the data. As I said, it is a partial solution.
Hope this helps!
cheers,
No, it's not possible. You can't apply parameter like Query Parameter in R script executed in R visual. It doesn't support executing R script within R visual dynamically based on selection in slicer.
Regards,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
85 | |
77 | |
66 |
User | Count |
---|---|
120 | |
111 | |
95 | |
83 | |
75 |