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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
TomCarpenter
Microsoft Employee
Microsoft Employee

R Script Multiple Sheets

I have several tables in Power BI and want to use R to do transforms and data manipulation on them. I can see that within a table, I can run an R script (the current table is referenced as 'dataset'). However, I'm unable to see how to reference multiple tables (e.g., join them together, run analyses on one table and use them to calculate values for another, etc.). 

 

It is possible to pre-process the data in R, save the tables, and then load them into powerBI. However, I'd love to have it all contained within PowerBI. I prefer to work in R rather than messing with DAX and M. Is there any way to do this? Or, do I need to pre-process data in R prior to import? 

1 REPLY 1
Anonymous
Not applicable

Hi @TomCarpenter ,

 

There are still some limitations to using R scripts in Power Query Editor to process data from multiple tables. I found a post where the steps are documented, I hope it will help you.

Operations on multiple tables / datasets with Edit Queries and R in Power BI

 

It is not clear what data source you are using. If you tend to use R for your data, consider pre-processing it before importing it to your desktop. 

 

In Power Query Editor, using M formula to process data should be the best choice, and it is quick to get started.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.