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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
donpep0
Frequent Visitor

Split table into multiple tables based on value of 2 columns

Hi!

I'm working with Power Query and I need to split the main table into multiple tables. It's possible to split a table into multiple tables based on 2 value conditions?

 

I have the below table and I need to create multiple tables based on Product and weekday

Product DateWeekdate#WeekdateVolume
ID0017/15/2022Fri5132
ID0017/16/2022Sat6413
ID0017/17/2022Sun7124
ID0017/18/2022Mon1124
ID00107/01/2022Fri5124
ID00107/04/2022Mon1125
ID0027/15/2022Fri5523
ID0037/15/2022Fri5324
ID00037/16/2022Sat6235
ID00037/18/2022Mon1523

 

And the expected outputs look like this:

 
Table1    
Product DateWeekdate#WeekdateVolume
ID0017/18/2022Mon1124
ID00107/04/2022Mon1125
Table2    
Product DateWeekdate#WeekdateVolume
ID0017/15/2022Fri5132
ID00107/01/2022Fri5124
Table3    
Product DateWeekdate#WeekdateVolume
ID0017/16/2022Sat6413
Table4    
ID0017/17/2022Sun7124
Table5    
ID0027/15/2022Fri5523

Do you know how can I do it? I have multiple products for each day

3 REPLIES 3
vladimirskpu
New Member

I have the same question but I think the answer will be the same: it is not possible with Power Query. My reason to split table into more tables: within one table there are records which I would like to process differently: I want to assign to the table record specific identification ID based on certain criterions (conditions) in levels of conditions: first, based on most specific condition, bridge (for merge) then if not found in the most specific bridge based on different field, less specific bridge - put into ID some average substitute ID and then third possible way if neither of the two is applicable (both merges was lef outer join) use very general substitute ID.... So I think I have to create duplicates of the whole table, or, should be better(??), reference to the original table, filter it twice and at the end append each part of such adjusted table together... The only issue with that approach is that the table is quite large so it takes more time to run all three parts of processing and then to process final resulat as one table... I think for such a task there are better tools than power query (knime e.g.) but still even this task is achievable with Power Query, just less efficient...

v-jingzhang
Community Support
Community Support

Hi @donpep0 

 

Power Query doesn't support to split a query into multiple queries based on values. For a better modeling and report authoring experience, it is not recommended to split same structure data into multiple queries too. 

 

You can try the Group By feature to get a similar result in one single query as below. After grouping, you will have a table column. Every cell in this column is a table that only has data of this product-weekdate group. You can choose to expand the table column then every goup data will be together. Grouping or summarizing rows - Power Query | Microsoft Docs

vjingzhang_0-1662453421632.png

 

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

BA_Pete
Super User
Super User

Hi @donpep0 ,

 

Looks like an XY Problem to me.

Can you give details on what exactly your end-goal is please? Splitting tables into pieces like this is highly irregular, so I'm thinking there's probably a faster/easier way to get to your end-goal than this.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.