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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Power Query - Expand multiple tables (from Python dataframes)

I am having a problem that may have a simple answer but I can't find it in the forums.

I am running a Monte Carlo python script in power query that creates multiple panda dataframes.

The results is that you see multiple tables which you can expand individually and they have the correct results.

 

stuwoodward_0-1610058092803.png

I would like to expand all of the tables seperately as they have different formats and I am not sure how to achieve this. The results would be up to 5 seperate tables (dataset, df1, df2, df3, df4).

I can not run the same query multiple times and expand a different table each time as monte carlo is based on random data so each time you run it you get fifferent answers and the tables are related to each other.

I can not expand all into one flat file as they have different schemas.

Any suggestions would be appreciated.

 

 

 

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

@Anonymous , you might simply create new queries referencing this query (assume the name is "py tables"). For instance, expanding the table in line with "dataset" is

= #"py tables"[Value]{0}

then #"py tables"[Value]{1}, ...{2}, ...{3}, etc.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

@Anonymous , you might simply create new queries referencing this query (assume the name is "py tables"). For instance, expanding the table in line with "dataset" is

= #"py tables"[Value]{0}

then #"py tables"[Value]{1}, ...{2}, ...{3}, etc.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Anonymous
Not applicable

Thanks. That fixed it 👍

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.