SOLVED

Power Query editor issue

Brass Contributor

I have data showing by product number in one column and sales by size in individual columns another words every size has its own column then I have columns with the same size names showing stock on hand by each size. How do I get one column to show size (once only), one column to show sales for each size and one column showing stock on hand for each size? 

 

Thanks for your help

 

 

4 Replies
best response confirmed by Eqa33 (Brass Contributor)
Solution

@Eqa33 Perhaps the attached file with a very basic table and query will get you on your way. It unpivots the initial table, Splits the original column headers (assuming they are structured as in the example) and then re-pivots the whole ending up with 4 columns (ProductNr, Size, Type [Sale or Stock] and Qty).

@Riny_van_Eekelen Thanks for your reply. Your example is correct. Once I have unpivoted the entire Table I end up with the example below. How or what do I split these 2 columns into, to extract inorder to end up as your example?

 

Thanks again

@Eqa33 Could you upload the underlying data in stead?

I've fixed it by cahnging the column headers to have two consistent descriptions. For Example: 1) 6 SOH 2) 6 Sales ETC for every size. This way I can easily split the column. Thanks for your help
1 best response

Accepted Solutions
best response confirmed by Eqa33 (Brass Contributor)
Solution

@Eqa33 Perhaps the attached file with a very basic table and query will get you on your way. It unpivots the initial table, Splits the original column headers (assuming they are structured as in the example) and then re-pivots the whole ending up with 4 columns (ProductNr, Size, Type [Sale or Stock] and Qty).

View solution in original post