Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello everybody,
I am quite a newbie on Power Bi and I am facing a setback. Indeed, I have a first R script which allows to have informations on many activities. I would like to request informations on an activity only when it is selected such as the following schema :
The informations about the activity could be link thanks to the activity_ID so I decided to create a measure which were containing the id of the activity selected.
However, I do not know now how to do my request. I try to do it with the R from PBI Desktop but it was not working.
It is probably more efficient to do it in the Power Query but I do not know how to do it because my measure about the selected activity is not there.
I would like to know what is the best way to do it. Because I can request my database on R but I do not succeed doing it on PBI.
Thanks in advance for your time
Solved! Go to Solution.
Hi, @maxduff59 ;
Here are three ways to connect R;
1. Importing Data Using R Script.
Open a blank Power Query report in Power BI. Go to Get data under the Home tab and choose More.
Once the pop-up window appears, type R script in the search bar and select it. Then, click Connect.
2. Executing An R Script In Power Query.
Create a calculated column in the table. You can do this by clicking the Transform tab and then selecting Run R script.
3. Creating Visualizations Using R In Power BI.
Three Ways To Use R Script In Power BI - Enterprise DNA
You must separately install R on your local computer in order to run R scripts in Power BI Desktop.
And If you want to filter values, my idea is to import R, create a slicer, and then write the measure in dax.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @maxduff59 ;
Here are three ways to connect R;
1. Importing Data Using R Script.
Open a blank Power Query report in Power BI. Go to Get data under the Home tab and choose More.
Once the pop-up window appears, type R script in the search bar and select it. Then, click Connect.
2. Executing An R Script In Power Query.
Create a calculated column in the table. You can do this by clicking the Transform tab and then selecting Run R script.
3. Creating Visualizations Using R In Power BI.
Three Ways To Use R Script In Power BI - Enterprise DNA
You must separately install R on your local computer in order to run R scripts in Power BI Desktop.
And If you want to filter values, my idea is to import R, create a slicer, and then write the measure in dax.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.