When I try to Unpivot the attached Table it does not align the values as expected. Am I missing a step? Or will I need to create 2 separate queries and append?
Hi Moavu,
Please attach a file with your attempt so I can see where things might be going wrong.
Mynda
Hello Moavu,
I thought I could use some practice myself, is the attached what you are expecting ?
If so all I did was select columns A & B and then ran Transform > Unpivot > Unpivot Other Columns.
Alternatively select the other (value) columns and Unpivot Columns.
PS: I also split the year out of the heading text into a separate column
Alex
Hello Alex,
I tried that before.
May be I was not very clear, the result I am looking for is 5 columns
one for Sales, Sales out, Year, Cat and Product.
I have created two separate queries and merged them and it works.
Is there a way to do it in one query?
I have attached my starting to end position.
Thanks,
Moavu
Hello again Moavu,
Since what I sent you is a fully unpivoted version, you can simply use Power Query's "Pivot function" to swing the column that had the Sales / Sales out attribute in it, back to being columns.
I did it by selecting that Attribute column, invoking Transform > Pivot, selecting the Value column from the drop down box in the dialogue box.
See if the attached is how you wanted to finish up. I added a Notes sheet with a screen shot of the Pivot dialogue box.
Hi Alex,
Many thanks,
It worked. I was missing out the step of splitting the column with Sales and Sales out.
Thanks once more.
Moavu