Expand 3 Columns with Tables Simultaneously PowerQuery

AEAA

New Member
Joined
Apr 12, 2022
Messages
31
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi all,

I am fairly new to PowerQuery. I have 3 columns, each one with a Table (all tables have the same structure and number of rows):

1667403723877.png


When I expand Column 1, every row of the expanded table gets a table for Column 2 and 3, So I get a big number of duplicates.

1667403879739.png


Is there any way I can expand all three at the same time so I still maintain the same number of rows?

I have tried Add Column -> Custom Function -> =Table.FromColumns({Proficiency,Frequency,Efficiency}) But it does not work as it does not accept Tables as lists. My idea was to merge all three and then expand in one go.

Thank you so much for the help.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
like this Add Column -> Custom Function ->

Power Query:
Table.FromColumns(Table.ToColumns([Proficiency]) & Table.ToColumns([Frequency]) & Table.ToColumns([Efficiency]))

It will leave you with generic column headers Column1, Column2 ... in the table in the added column

How to replace the generic with more meaningful headers depends on whether any of the headers are the same in the three starting tables as you cannot have any header repeated in a table.
 
Upvote 0
Solution
Hi JGordon11,

Thank you very much for this. It does exactly what I needed.

The syntax needed a "#" before every column, but PQ added that automatically, so it worked fine.

Table.FromColumns(Table.ToColumns(#[Proficiency]) & Table.ToColumns(#[Frequency]) & Table.ToColumns(#[Efficiency]))
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,194
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top