Forum Discussion

kandre123's avatar
kandre123
Icon for Advocate I rankAdvocate I
6 years ago

unpivot tables

Hi, 

 

In my quest for flattening tbles i have need for some help. I have need for a way to unpivot a dataset with 310 columns The dataset is as follows

 

2 columns with Keys, rest is columns with values to be unpivoted and comes in batches of 10. So i have 10 columns with values defined by Revenue and year. Next batch is 10 columns by costs and year etc.  Each cell in this is a number value and getting one value column would be helpful.  The thing is that the last batch of 10 columns is currency with GBP, NOK,USD etc by year.

 

How would i unpivot these so as to not make duplicate values or getting currency nominator in the value field?

2 Replies