Pivoting on horizontally stored data - breaking apart one-to-many relationship

ken800

New Member
Joined
Apr 24, 2014
Messages
6
Office Version
  1. 365
Platform
  1. Windows
1707919556421.png


I have a huge file that is updated regularly that has both past and future planned server configurations based on sales forecasts. I'm trying to get a handle on forward demand and want to pivot out the SSDs we are installing in various servers and what server slot they are put in. I have created a sample chart and sample ideal pivot above. For simplicity sake, there are only 6 in the above example but there are hundreds of possible drives I can use (just 5 here) and up to 24 possible slots the drives can go into. Essentially I want to be able to pivot out the data and sum each quarter in the pivot so I can total and sort at the end. Not every drive is used in every quarter and I need to make sure I account for every single drive used in whatever time period it is modeled (usually 1 year back and 1 year forward). What would you suggest I do to break this down into something usable?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I am sure this can be done more elegantly in an all in one LET statement. But, this will do what you ask:
I think my totals are wrong because I had to recreate your data, and probably have a typo (or your example was incorrect).

Book1
ABCDEFGHI
1QuarterServerSlot1Slot2Slot3Slot4Slot5Slot6
22023-Q1OZBKSS1SS1SS1SS2
32023-Q1ICLVSS1SS2SS2
42023-Q2OFXSSS3SS3SS1SS1SS1
52023-Q2NFKYSS4SS4
62023-Q3JPEZSS1SS4
72023Q4KYCASS1SS1SS1SS1
82023Q4HQOASS1SS1SS5
92023Q4XQEBSS2SS2SS5
10
112023-Q12023-Q22023-Q32023Q4
12SS1431614
13SS230025
14SS302002
15SS402103
16SS500022
177721026
18
Sheet3
Cell Formulas
RangeFormula
B11:E11B11=LET(Q,$A$2:$A$9, UnqQ,TRANSPOSE(UNIQUE(Q,FALSE,FALSE)),UnqQ)
A12:A16A12=LET(slots,$C$2:$H$9,Unqslots,TRANSPOSE(UNIQUE(TEXTSPLIT(TEXTJOIN(",",,slots),",",,TRUE),TRUE,FALSE)),Unqslots)
B12:E16B12=SUMPRODUCT(($A12=$C$2:$H$9)*(B$11=$A$2:$A$9))
F12:F16F12=SUM(B12:E12)
B17:F17B17=SUM(B12:B16)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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