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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
wwyws0000
Regular Visitor

Using multiple tables/data to create a new data via R script

Hi all,

 

I'm a newbie PowerBI user and would like to get some help with the following scenario. Suppose I have data1 and data2 loaded into power BI through say, excel and sql. And I would like to have a data that takes in data1 and data2 as inputs, do some  complicated transformations and calculations via an R script, and have it as data3 in the report.  Does anyone know if this is possible?

 

So far the only way I found via searching is either just load data1 and data2 in the r script (instead of having them come from power BI). But I would like to avoid this approach due to various reasons.

 

One other way is to "transform" an existing data via R script but in that scenario I seem to only have acccess to a a single data (data1 or data2), not both. 

 

Any advice?

 

 

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @wwyws0000 ,

What do you mean "do some complicated transformations", if you connect data1 and data2 in import mode, you can do transformations or create another table based on data1 and data2 in Power Query.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the reply. By "complicated transformations" I mean things that can't be done through joining, simple arithmetics, etc. 

 

Would you be able to give an example of a power query that uses data1 and data2 and sends them to an r script? say the r script is just  "doThisFunction(data1,data2)"

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.