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
Tahech
Helper I
Helper I

Power BI: How to use Python to access multiple tables?

 

 

I'd like to do something like this inside PBI:

import pandas as pd
import numpy as np

proc = cad_processo
moeda = tab_moeda_data

def name_of_the_function(proc, moeda):
   df = code...
   return df

Now I'll explain more in-depth what I'm doing:

I'm in a table called cad_processo, I need to apply a very complex function to create a column in cad_processo, but in order to create this new column, I need another table called tab_moeda_data.

I tried what was explained in the post I quoted before, but I wasn't able to achieve nothing so far.

In theory it's simple, import 2 tables and apply a function to create a new column, but I'm not being able to import this second table (tab_moeda_data) into the cad_processo to apply the function.

 

Sem título.png

 

*I know that cad_processo is called dataset in this case I only need to import another table (tab_moeda_data) to apply the function, that's it.

Can anyone help me?

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @Tahech ,

 

Have you tried the solution in this post?

powerbi - Power BI: How to use Python with multiple tables in the Power Query Editor? - Stack Overfl...

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Yes, I already tried.

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.