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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Combine data from different table into a new table

Hi PBI Community

 

I've looked for similar topics but I didn't find one related to my request...

I have 3 different tables with the same kind of data in each of them:

  • Date of arrival of the container at the port
  • the week number related to this date
  • the number of pallets inside.

Each line is a different container.

Each table is from a different container company. 

My goal is to gather the number of containers and pallets by week.

 

Table 1:

Date1 | Week1 | Pallets1

3 sept | W37 | 12

3 sept | W37 | 10

12 sept | W38 | 20

19 sept | W39 | 25

 

Table 2:

Date2 | Week2 | Pallets2

4 sept | W37 | 20

12 sept | W38 | 10

20 sept | W39 | 15

 

Table 3:

Date3 | Week3 | Pallets3

3 sept | W37 | 18

12 sept | W38 | 12

19 sept | W39 | 10

20 sept | W39 | 15

 

I would like to create the table below:

Week | number of containers | number of pallets

37 | 4 | 60

38 | 3 | 42

39 | 4 | 65

 

Any help on this ?

 

Thanks a lot 🙂

4 REPLIES 4
parry2k
Super User
Super User

@Anonymous it will be easier if you append all the tables in power query and visualize from there. You will have one big table with all the rows in it and be straight forward from there. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k  you're totally right, that's what I would have done if my table were as simple as described.

Indeed, I simplified the problem to make it more understanble. Actually, those tables are really bigger and not exactly structured the same way for each of them (because coming from different companies). But I can find those 3 kind of data in each of them, and I want to compil this. Do you have an idea how to it ?

 

Thanks for your help.

dax
Community Support
Community Support

Hi sebastienke,

You could create a blank query, then use below M code(which will choose corresponding column from different tables)

let
    Source = Table.Combine({Table.FromColumns({T1[User],T1[Serial]},{"Table1 Column1","Table1 Column2"}), 
    Table.FromColumns({T1[User],T1[Serial]}, {"Table1 Column1","Table1 Column2"}),
    Table.FromColumns({T2[userid],T2[id]}, {"Table1 Column1","Table1 Column2"})})
    in
    Source

Best Regards,
Zoe Zhi

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

 

@Anonymous wel you first have to transform each table to get to the shape you described in example. Remove extra columns you don't need and rename the column , and then use the append.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.