Forum

Power Query - Unpiv...
 
Notifications
Clear all

Power Query - Unpivoting Multiple Columns with Multiple Values

4 Posts
2 Users
0 Reactions
113 Views
(@tmsd)
Posts: 3
Active Member
Topic starter
 

Hi,

I would be extremely grateful if you could assist me on this.

I would like to build a dashboard using Pivot Charts and using the data under various columns with various values. I need help to unpivot columns, where different columns have different classes, with each class having the same nature of values. I have colour coded the columns that need to make up one comulmn after unpivoting.

The blue tabs are products with units produced as values. These are to be one unpitvoted column with corresponding values. The lime tab are sales, with dollars as values making another unpivoted column. The purple column are expenses in two different currencies but making up one unpivotted column. The orange tabs are labour hours and the light blue are machine hours, each colour making up an unpivoted column with respective values.

Looking forward to finally overcoming this challenge.

Thanks in advance

TMSD

 
Posted : 30/12/2022 5:56 am
Riny van Eekelen
(@riny)
Posts: 1194
Member Moderator
 

Hi Thabani,

In case you intended to upload a file, please try again. This time, press the "Start upload" button before submitting your reply.

Riny

 
Posted : 30/12/2022 7:21 am
(@tmsd)
Posts: 3
Active Member
Topic starter
 

Hi Riny,

Apologies for failing to upload the file. I'll attach it in this reply. Failed to see how to attach it in my original post.

Thanks

Thabani

 
Posted : 30/12/2022 10:14 am
Riny van Eekelen
(@riny)
Posts: 1194
Member Moderator
 

When you connect to the entire table with Power Query, select the first two columns. Then choose Unpivot Other Columns and it will give you 4 columns. Week, Date, Attribute and Value. The Attribute column contains all the column headers and the Value column holds all the values from C6:W24.

Wouldn't that work?

https://www.myonlinetraininghub.com/power-query-unpivot-scenarios

 
Posted : 31/12/2022 3:34 am
Share: