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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
slk89
Regular Visitor

Power Query: Splitting a table based on column value.

Please note this question is based on Excel Power query.

 

After a merge operation (Full-Outer plus keep Only Non-matched), I have the table in the below format (Table1). My aim is to do an internal merge within the table, that should result in a table like Table2. 

 

My idea is to split the table based on column 'name'=null and then inner-join the resulting 2 tables based on 'name' and 'place'. 

 

Question : How to split the tables to 2 tables in powerquery based on a column value

 

Please suggest better ideas if any, in acheiving the below objective

 

slk89_0-1675684965055.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @slk89 ,

 

I don't know if you have tried appending both tables directly to get the desired result., you can refer to

Append queries - Power Query | Microsoft Learn

vstephenmsft_0-1676617928284.png

If the above method does not work, you must start from Table 1 below.

vstephenmsft_1-1676617981263.png

You duplicate a table, and then romve columns and rename columns as follows.

vstephenmsft_2-1676618112752.png

Table1

vstephenmsft_3-1676618140537.png

Table2

vstephenmsft_4-1676618147650.png

In Table1, choose append queries.

vstephenmsft_5-1676618160620.png

vstephenmsft_6-1676618185856.png

vstephenmsft_8-1676618260619.png

You can filter out blank rows.

vstephenmsft_7-1676618254022.png

Expected result:

vstephenmsft_9-1676618290868.png

 

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @slk89 ,

 

I don't know if you have tried appending both tables directly to get the desired result., you can refer to

Append queries - Power Query | Microsoft Learn

vstephenmsft_0-1676617928284.png

If the above method does not work, you must start from Table 1 below.

vstephenmsft_1-1676617981263.png

You duplicate a table, and then romve columns and rename columns as follows.

vstephenmsft_2-1676618112752.png

Table1

vstephenmsft_3-1676618140537.png

Table2

vstephenmsft_4-1676618147650.png

In Table1, choose append queries.

vstephenmsft_5-1676618160620.png

vstephenmsft_6-1676618185856.png

vstephenmsft_8-1676618260619.png

You can filter out blank rows.

vstephenmsft_7-1676618254022.png

Expected result:

vstephenmsft_9-1676618290868.png

 

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

 

 

Helpful resources

Announcements
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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