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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
polman4
Helper I
Helper I

Merge 3 tables (Append?)

Hello,

 

I have 3 different tables that I would like to merge into one. Actually from what I understand i need to do an append query but everything I tried is not working fine.

 

Below you find the structure from the 3 tables.

 

TimeSitePageFormatInsertionInsertion TypeImpressionsInventoryViewable ImpressionsRevenueTable
TimeName (Site)Name (Page)Name (Format)Name (Insertion)Name (Insertion Type)ImpressionsTotal inventoryViewable impressions Table1
TimeName (Site)Name (Page)Name (Format)Name (Insertion)Name (Insertion Type)RTB+ Impressions Viewable impressionsRTB+ Gross revenueTable2
TimeName (Site)Name (Page)Name (Format)  HB Impressions  HB RevenueTable3

 

I don't want to merge columns just need to append data from each column into the new merging table but each column needs to be appended to the right column. Some columns may be left empty.

 

The last column will be written depending the table. For example if this rows data belong to "table1" then write table 1, etc

 

Any suggestion?

 

Thank you,

Greg

3 REPLIES 3
KNP
Super User
Super User

Sorry, I just reread your post, I understand the column structure better now.

 

I think what you actually need to do is rename the columns of each of the three tables prior to the append. 

If each of the three files you have are at least consistent (individually) you could just do the rename on the three files and then append.

 

 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
polman4
Helper I
Helper I

Hello KNP,

 

Thank you a lot for the reply and the example!

 

What troubles me is that the 3 tables i have don't have the same structure. For example table 2 is missing Inventory Column. From what i've seen you are using as base "storeA" table at your example with 

= Table.ColumnNames(StoreA)

 

So (i guess) i can't just append the 2nd and 3rd table to first since the structure isn't the same. Maybe a 1 to 1 matching is needed?

 

Thank you,

Grigoris

KNP
Super User
Super User

Hi Greg,

 

Have a look at the attached PBIX.

The way I would typically deal with this is to skip the headers, append, add desired headers back on.

As for a column for the source table, add that prior to appending. Doing this dynamically will depend on the data source. May need some more info to assist with that, but let's start with the append.

 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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