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
pmaurizi
Frequent Visitor

Load query result in several sheets (Power Query Excel)

Hello everybody.
I wonder if anyone knows if it is possible to subdivide an Excel file into several sheets from Power Query.


I mean, the result of the query to be loaded in different sheets, according to a segmentation.

 

I would like to illustrate this with an example:
We have a file in which there is information of 15 clients, the idea would be that the result of the query be separated in 15 sheets, according to the name of the "Client".

 

The number of clients could be variable.

 

Thank you very much!
Regards
Pablo

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @pmaurizi 

 

To my knowledge, Power Query is not a good tool to do this task. In Power Query, queries cannot be created automatically or dynamically according to a dynamic value from another query. The queries are pre-defined by you, so the number of queries is fixed. The number cannot be changed according to the data change in a single query. 

 

I found some articles about using Python or Power Automate to complete this task. Hope they will be helpful:

How To Split An Excel File Into Multiple Files Using Python - Python In Office

Solved: Split an Excel file into several sheets - Power Platform Community (microsoft.com)

How to Export filtered data to Excel from Power BI... - Power Platform Community (microsoft.com)

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @pmaurizi 

 

To my knowledge, Power Query is not a good tool to do this task. In Power Query, queries cannot be created automatically or dynamically according to a dynamic value from another query. The queries are pre-defined by you, so the number of queries is fixed. The number cannot be changed according to the data change in a single query. 

 

I found some articles about using Python or Power Automate to complete this task. Hope they will be helpful:

How To Split An Excel File Into Multiple Files Using Python - Python In Office

Solved: Split an Excel file into several sheets - Power Platform Community (microsoft.com)

How to Export filtered data to Excel from Power BI... - Power Platform Community (microsoft.com)

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

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.

Top Solution Authors
Top Kudoed Authors