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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Pivot Columns in Grouped Data (Having Nested Tables)

 

Hi guys,

I seek your usual support to advise how may I sort this challenge.

 

As per the below, I got some data grouped to get me the attendance figures of each month for each employee distributed between training and production, and of course, the rest of the data is nested in the last column.

 

The base here is column: Training / Production that I wish to pivot along with column: Attendance % (the value) to get what was the attendance for each of training and production during the month for each employee so I could proceed with a conditional column then to decide somethings.

 

Problem is, Power Query does not allow that action as long I’ve nested data (the tables columns) and it get me this error: “Expression.Error: We cannot apply a Pivot operation over a table that contains columns with nested data. Please remove those columns first”.

 

So, how could I sort this? I need both the training and the production attendance of each month for each employee to set the mentioned conditional column.

 

I’m open for another solutions, it’s not a must to use the pivot column option I mean.

 

 

Magdoulin_0-1629840396186.png

 

 

Magdoulin_1-1629840455530.png

 

2 REPLIES 2
palapoorv
Frequent Visitor

 
watkinnc
Super User
Super User

In this situation, because all but one of the columns is involved, you could probably add an index column before your pivot. Then Duplicate that table, and choose just the index and nested table column. Back to the first table, remove the nested table column. Do your pivot. Then use the Merge GUI function and join the 1st and second table. That should do it!

 

--Nate


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors