Forum

Unpivot Multiple ro...
 
Notifications
Clear all

Unpivot Multiple rows

4 Posts
2 Users
0 Reactions
58 Views
(@kengjisugmail-com)
Posts: 8
Active Member
Topic starter
 

Hi,

 

I am struggling to arrange my data without using two queries and subsequently merging. I have tried several combinations but it does not work.

I have the desired outcome in the attached file.

 

Please help.

Thanks,

 

Moavu

 
Posted : 24/03/2017 9:58 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Moavu,

The trick when you have nested headers is to Transpose the data first. Then you can promote headers and unpivot, before pivoting the Net Value and Sales Units again. See file attached.

Mynda

 
Posted : 24/03/2017 9:27 pm
(@kengjisugmail-com)
Posts: 8
Active Member
Topic starter
 

Hi Mynda,

Thanks I was missing the transpose step.

 

I have another conundrum of more than two rows to be unpivoted.

I have managed to do it using 4 merged queries but I am hoping there is a faster method with just one query?Confused

 

I have attached the file.

 

Thanks,

 

Moavu

 
Posted : 20/04/2017 12:28 pm
(@mynda)
Posts: 4761
Member Admin
 
Hi Moavu,

In future please start a new thread for a new question.

In the file attached you'll see the steps required in the query on the sheet called 'Mynda'.

Kind regards,

Mynda

 
Posted : 21/04/2017 7:56 pm
Share: