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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
palvarez83
Helper I
Helper I

Help combining 2 columns of Tasks and associated Subtasks into a single column

Hello, 

In power query I have a table with 2 columns that looks like this:

TasksSubTask
Task1SubTask1.1
 SubTask1.2
 Subtask1.3
Task2Subtask2.1
 Subtask2.2
Task3Subtask3.1

 

In power query I would like to combine these into a single column with subtask showing up under the part task similar to this:

Task1
SubTask1.1
SubTask1.2
Subtask1.3
Task2
Subtask2.1
Subtask2.2
Task3
Subtask3.1

 

However, I am struggling with the steps involved.  Please help.  TIA

1 ACCEPTED SOLUTION
AndreasKiller
Regular Visitor

This is your source in PQ:

AndreasKiller_0-1755700970823.png

Select both columns, right-click and unpivot columns:

AndreasKiller_1-1755701038410.png

Remove the Attribute column, done.

 

Andreas.

View solution in original post

4 REPLIES 4
AndreasKiller
Regular Visitor

This is your source in PQ:

AndreasKiller_0-1755700970823.png

Select both columns, right-click and unpivot columns:

AndreasKiller_1-1755701038410.png

Remove the Attribute column, done.

 

Andreas.

Awesome!  This did it!  Mistake I was making was only unpivoting one column.

Greg_Deckler
Community Champion
Community Champion

@palvarez83 Honestly, that seems like a really bad idea. I would use Fill Down in your Tasks column instead. Can you explain why you want to do what you want to do because you almost certainly don't want it in that format. I mean, there may be a good reason but I can't think of what it might be.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

The reason for doing this is for importing the tasks and sub tasks into MS project and that is the format required.

 

The tasks and sub tasks were pulled with copilot from a slide deck of multiple pages in which the slide title was the the Task name and the sub tasks were pulled were bullet points in the slide.  The result was a table formatted like I've indicated above.

 

Since the solution above (unpivoting both columns) worked, I'm going to see if Copilot can do this directly (now that I know what to ask).

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors