Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I have two columns (or it can be a list) with the same number of rows. I would like to create a table that has the two columns (or lists) combined as in the example in the image. Which function or step should I follow?
Solved! Go to Solution.
You can start a new blank query and use Table.FromColumns to get your result
= Table.FromColumns({Name[Name], Age[Age]})
It needs a list of table names. You can create a list from a query column with the syntax above - QueryName[ColumnName]
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
You can start a new blank query and use Table.FromColumns to get your result
= Table.FromColumns({Name[Name], Age[Age]})
It needs a list of table names. You can create a list from a query column with the syntax above - QueryName[ColumnName]
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypat ,I haven't used Table.FromColumns yet and it solved my case perfectly. Thank you.
@MattAllington I'm also using List.Zip, but this step does not solve it. Thank
Add an Index column in Power Query to both columns. (Both should start from the same number e.g.1)
Merge the tables using an Inner Join.
Personally, I would use List.Zip. Make sure both are lists first.
https://excel.city/2017/11/how-to-use-list-zip-in-power-query/
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
27 | |
27 | |
25 | |
13 | |
10 |
User | Count |
---|---|
24 | |
19 | |
16 | |
13 | |
10 |