Taking 9 columns and making them vertical with other data

jackson1990

Board Regular
Joined
Feb 21, 2017
Messages
56
Hey everyone,

I was working on a project in excel where I have 9 columns of dates. They each column represent a milestone in a project (it's kind of a scheduler). I want to make a pivot table that makes it so I can see all the milestone dates. Currently this is impossible as they are in 9 columns, and in a pivot table that means they can't all be shown in an organized manner. So what I wanted to do is make all of the dates vertical in one column, but I also need to pull in the data from other columns to match it. So here is a simple example (did less milestones) of how it is currently and how I want it to go, if it is even possible to automatically? As I have a large set of data.

Currently:
IDProject Name
Milestone1Milestone2Milestone3Milestone4
1Test17/3/20187/20/20187/28/20188/4/2018
2Test21/1/20181/6/20181/20/20181/25/2018
3Test34/12/20184/18/20184/23/20184/25/2018

<tbody>
</tbody>

How I want it to transform
IDProject NameMilestone #Date
1Test11
7/3/2018
1Test127/20/2018
1Test137/28/2018
1Test148/4/2018
2Test211/1/2018
2Test221/6/2018
2Test231/20/2018
2Test241/25/2018
3Test314/12/2018
3Test324/18/2018
3Test334/23/2018
3Test344/25/2018

<tbody>
</tbody>

Is this even possible?

Thanks for your help everyone!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
One further question, is there a way to keep that "extracted,drilled down" data connected to the source? I ask because if a user changes the original I would like it to show on the new pivot table as well. Currently, it seems like that data is static and not connected to the source.
 
Upvote 0
You can try PowerQuery (2010/2013 add-in, 2016 built-in).
It will give you refreshable table (Ctrl+Alt+F5) to see new data if any will be changed in source table.

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Project Name", type text}, {"Milestone1", type date}, {"Milestone2", type date}, {"Milestone3", type date}, {"Milestone4", type date}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"ID", "Project Name"}, "Attribute", "Value"),
    #"Renamed Columns" = Table.RenameColumns(#"Unpivoted Other Columns",{{"Value", "Date"}, {"Attribute", "Milestone #"}}),
    #"Replaced Value" = Table.ReplaceValue(#"Renamed Columns","Milestone","",Replacer.ReplaceText,{"Milestone #"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Replaced Value",{{"Milestone #", Int64.Type}})
in
    #"Changed Type1"


IDProject NameMilestone #Date
1​
Test1
1​
03/07/2018​
1​
Test1
2​
20/07/2018​
1​
Test1
3​
28/07/2018​
1​
Test1
4​
04/08/2018​
2​
Test2
1​
01/01/2018​
2​
Test2
2​
06/01/2018​
2​
Test2
3​
20/01/2018​
2​
Test2
4​
25/01/2018​
3​
Test3
1​
12/04/2018​
3​
Test3
2​
18/04/2018​
3​
Test3
3​
23/04/2018​
3​
Test3
4​
25/04/2018​
 
Upvote 0
Hmmm that's a good thought! The only issue is my company is split between 2016, and 2013/2010, and I'm not sure the user base is tech savvy enough to install power query. Great thought though! It might not be possible otherwise though.
 
Upvote 0
With 2016 you can do that then convert to Excel Table and propagate it to others as normal Excel table.
But ok, I don't know all issues there :)
 
Upvote 0
True...let me give it a shot to see if that works and I'll report back after to let you know if that works.
 
Upvote 0
Sure, but one thing - if you convert to Excel Table you will lost Refresh for new data.
So choose :)

You can send the file without converting and people without powerQuery will see the Excel table and will not be able to refresh but people with PowerQuery will be able to refresh
 
Last edited:
Upvote 0
it seems like that data is static and not connected to the source.

Yes, and the only remedies I know are through VBA (including the macro recorder which requires little to no coding knowledge), Power Query, or creating a new table each time the data is changed. You can keep or delete the first table.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,591
Messages
6,131,618
Members
449,658
Latest member
JasonEncon

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