Dynamic "pivot group" names for Unpivot

More
3 years 11 months ago #19487 by Serigraph
Hi,
We receive a csv that contains dates in the header row. The values for each date is a quantity associated to an item part number. See attached for an example file.
We are able to successfully use the unpivot function to normalize these.

Our issue is this:
The dates change and are very important. When a date has passed, it is no longer given to us, and we see a new date in the future. For example in the file provided, once 10/17/2019 is over, it will no longer be given and we will see the next date in the future of 11/28/2019.

When using the unpivot function, in the "pivot group" tab, we have manually entered the dates under "pivot group." This cannot work for us due to consistantly changing values.

Is there a way to dynamically set a "pivot group" name to the header value?
Attachments:

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #19488 by admin
Hello

Is number of headers always the same?

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #19490 by Serigraph

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #19492 by admin
OK in this case what you need to do is to convert your data into something like this.
We will create a working example for you


Mike
ETL Architect
Attachments:

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #19493 by admin
Here is the examples screenshots


Mike
ETL Architect
The following user(s) said Thank You: Serigraph

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #19494 by admin
I have attached the actual example for your convenience

File Attachment:

File Name: Case1_2019-10-18.zip
File Size:9 KB

Mike
ETL Architect
Attachments:
The following user(s) said Thank You: Serigraph

Please Log in or Create an account to join the conversation.