SOLVED
Dynamic Column Name with Merged Cells
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
bburzanko
5 - Atom
‎08-27-2024
01:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have the sample file attached that has Year / Month / Actual-Budget information. I am trying to get to a point to have the column names pulled from the first 4 rows to have the column name be 2023-2-November Actual, 2023-2-November Budget, 2023-3-December Actual, 2023-3-December Budget, etc...
The merged cells are causing an issue for me to allow for this and the periods change so I cant just manually rename.
Has any one dealt with this issue and what was the work around you used for it?
The file attached has the input and end goal.
Solved! Go to Solution.
Labels:
1 REPLY 1
12 - Quasar
‎08-27-2024
01:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi! Take a look at this and see if it works.
What I did was separate the data into the first 4 rows = headers and then skipping the first 4 rows
- Set the Input Tool to have "first row contains data" so the column headers are called F1, F2, etc, and the years starts in Row 1
- Sample Tool to get the first 4 rows which contain the different column header values
- Flip the first 4 rows into columns
- Use Multi-Row Tool to fill in nulls - this is the trick to get around your merge problem
- Summarize to Concatenate based on Column # (F1, F2, etc)
- Put the now-single-column of column headers into a row so it could be Unioned with the rest of the data
- Dynamic rename to take the now-single-column of column headers into the proper column header position
 
