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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

How to append two tables when we have different column names?

Hello All, 

I have a columns like week18, week19, week20, week21, week22, underneath each column I have customer qty and buyer as sub column headers in table1, same way I have columns like week19, week20, week21, week22, week23 underneath each column I have customer qty and buyer as sub column headers in table2 as well, these files I will receive on weekly basis so column headers will keep moving forward to next WeekNo and so on. These files are stored in SharePoint folders. Requirement is that i want to append these tables and prepare a output report which includes those all week columns as single column as "week" And underneath wk-18, wk-19, wk-20, wk-21, wk-22, wk-23 to those corresponding customer qty and buyer values. I am facing challenge in handling week (date) columns as it's weekno keep moving forward and we end up getting to different weekno columns and not sure like which weekno belongs which value. Can you please help me to find a solution for this?
2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

You can demote headers on both files so that you are appending with names like Column1, Column2, etc.

 

--Nate

View solution in original post

v-cgao-msft
Community Support
Community Support

Hi @Anonymous ,

You might also consider unpivoting these columns before attaching them together.

vcgaomsft_0-1716261566829.png

vcgaomsft_1-1716261632623.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @Anonymous ,

You might also consider unpivoting these columns before attaching them together.

vcgaomsft_0-1716261566829.png

vcgaomsft_1-1716261632623.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Anonymous
Not applicable

You can demote headers on both files so that you are appending with names like Column1, Column2, etc.

 

--Nate

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors
Top Kudoed Authors