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
anthonjhnon1
New Member

Creating Two columns from one column

Screenshot 2023-12-12 134810.png

So I have this table that is not in the format that I would like. What I'm tryign to do is create a table in Power Query that will return 

AreaFeederDevice
EAI3434
EAI1501A1501A
EAI1501A6R21
EAIA162A162
EAIA1622X29
ELA4017L7511
ELA4017L8312


How can I accomplish this?

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

=Table.FromPartitions("Area",Table.ToRows(Table.Group(YourTable,"Column1",{"n",each Table.PromoteHeaders(Table.Skip(Table.Transpose(_)))})))

View solution in original post

3 REPLIES 3
anthonjhnon1
New Member

This worked perfectly, thanks so much. Do you have any tips/tricks/information on how I can get better and understand Power Query like this?

1 group your data by ID

2 in each group, transpose the sub table, and skip the first row, and promote the first row as headers.

3 transform the table to  a list of lists, which item is a list, of which the first item is a value and the second is a table.

4 use Table.FromPartitions to expand that list to table

 

wdx223_Daniel
Super User
Super User

=Table.FromPartitions("Area",Table.ToRows(Table.Group(YourTable,"Column1",{"n",each Table.PromoteHeaders(Table.Skip(Table.Transpose(_)))})))

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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors