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

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.

Reply
TomCarpenter
Employee
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
v-cgao-msft
Community Support
Community Support

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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