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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
peterhui50
Helper III
Helper III

Using an R script -- how to refer to another table ?

Hi,

 

I am just testing a simple script but I don't know how to refer to another table. I don't know how to refer to [SALES_TABLE] in an R script.

 

I can probably break it down in PQ and do the joins there, but sometimes it's easier to just paste in a script first as test.

 

# 'dataset' holds the input data for this script

 

library(dplyr)

 

dataset_2 = dataset %>%
filter(Units== "Y") %>%
inner_join(SALES_TABLE,  c("Unit_ID")) %>%
select(Units_ID, Unit, Sales) %>%

sample_n(100)

 

dataset_2

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @peterhui50 ,

As far as I know, currently it is not supported in power bi.

You can vote for this idea or create a new idea here to help us improve power bi:

Query Editor: Allow R Scripts to Reference Existing Queries 

 

It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,
Community Support Team _ Yingjie Li
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-yingjl
Community Support
Community Support

Hi @peterhui50 ,

As far as I know, currently it is not supported in power bi.

You can vote for this idea or create a new idea here to help us improve power bi:

Query Editor: Allow R Scripts to Reference Existing Queries 

 

It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

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

 

amitchandak
Super User
Super User

@peterhui50 , I have not tried R, But in python, whatever column and measure you dragged on visual they are available to you.  Tables should be joined in power to drag columns together

 

refer if needed https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-r-visuals

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors