Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to convert some columns in table into rows?
Product ID | Product Type | Sale Date |
12345 | A1 | 6/3/2013 |
A2 | 12/5/2012 | |
A3 | 5/4/2013 | |
A4 | 2/18/2013 | |
56783 | A2 | 2/9/2013 |
A3 | 5/4/2013 | |
A1 | 3/21/2012 | |
34567 | A2 | 5/22/2013 |
A3 | 3/9/2012 | |
A4 | 2/9/2013 | |
A5 | 1/2/2012 | |
I want to convert the above table as below during the load
Product ID | A1 | A2 | A3 | A4 | A5 |
12345 | 6/3/2013 | 12/5/2012 | 5/4/2013 | 2/18/2013 | - |
56783 | 3/21/2012 | 2/9/2013 | 5/4/2013 | - | - |
34567 | - | 5/22/2013 | 3/9/2012 | 2/9/2013 | 1/2/2012 |
Thanks in Advance
Generic Load ProductID, [Product Type], [Sale Date] From ...
Then you can create the needed table as a straight table of table box.
HIC
I want to join the converted table with another table based on Product ID.I need to do it in data model not in UI.
I tried generic load it is creating table with duplicate Product ID's.May be because of Same Sale date for some product types?