Excel/Power Query - Combining Identically formatted data from multiple sheets in a particular way

Excel Jason

New Member
Joined
Oct 17, 2022
Messages
26
Office Version
  1. 365
Platform
  1. Windows
Hello!

I have an interesting challenge that I'm looking to "gauge the room" on the most efficient approach to solve it. I suspect Power Query may be the winner but need brighter minds than my own.

I have 52 files containing identically formatted (but differnet data). I need to combine all 52 files into a single table thats manipulated as such:

The dates and quantities are transposed and the item numbers are repeated as many times as there are unique dates for each item number. I would then like the second, third, fourth, etc.. file to add it's data beneath the previous files data vertically. My files are relatively large so I suspect this to be a massive (900k Row) file.

Hopefully I'm making sense - please let me know if you need clarification!

Data Example:
ITEMDescrLOC10-24-2210-31-2211-07-2211-14-2211-21-2211-28-2212-05-2212-12-2212-19-22
10221463UnknownUnknown
8948​
4270​
4745​
6399​
4664​
9654​
3361​
6373​
6735​
10224680UnknownUnknown
6361​
6466​
784​
752​
3161​
3584​
5123​
345​
3404​
10224681UnknownUnknown
4630​
510​
8185​
130​
142​
4065​
8286​
9430​
3337​
10184291UnknownUnknown
5465​
7065​
5708​
7190​
4800​
2419​
6292​
3202​
2895​
10239929UnknownUnknown
6121​
9585​
2691​
6742​
2305​
9172​
7475​
7848​
9082​
10239930UnknownUnknown
6447​
3559​
548​
61​
8006​
5972​
5685​
7854​
188​
10245568UnknownUnknown
6278​
7723​
3969​
2382​
5338​
4132​
1507​
3307​
4061​
10249906UnknownUnknown
9255​
6889​
4527​
2722​
3252​
4188​
6923​
9863​
5388​
10250138UnknownUnknown
5820​
3979​
5814​
4033​
8340​
4126​
8536​
1452​
3450​
10267670UnknownUnknown
2026​
496​
8408​
2141​
5059​
3238​
1910​
4242​
8276​
10233093UnknownUnknown
9736​
9361​
9720​
1722​
2960​
8419​
761​
1961​
427​
10233103UnknownUnknown
6251​
2942​
3236​
3869​
2814​
487​
2913​
192​
837​
10238629UnknownUnknown
7376​
6575​
502​
5133​
3348​
6055​
346​
4265​
2143​
10239792UnknownUnknown
3901​
4260​
3062​
3724​
7666​
3490​
9530​
4031​
7878​
10251121UnknownUnknown
295​
4614​
8761​
1753​
6031​
5225​
7667​
9703​
8423​
10268674UnknownUnknown
3201​
1997​
7512​
6018​
6239​
1171​
7100​
3147​
4558​


1667351834819.png
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Have all files in one folder and then load them into pq and transform append. The key will be to have them in one folder.

 
Upvote 0
Hey Alan, thanks for the tip! Yes, pq all the way; However, could you please provide a few steps to perform in pq that would align my data the way I displayed it above?

The root cause seems to be the complexity around the SKU numbers. Those aren't transposed they're duplicated as many times as there are dates (which need to be transposed) along with their respective volume numbers (also transposed).

Hopefully I'm making sense, thank you!
 
Upvote 0
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"ITEM", "Descr", "LOC"}, "Attribute", "Value")
in
    #"Unpivoted Other Columns"
 
Upvote 0

Forum statistics

Threads
1,215,415
Messages
6,124,764
Members
449,187
Latest member
hermansoa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top