Hi, and of course “HELP!”
I need to take some values in a column and create column names from them, taking the associated values with them.
My starting table looks like this (note this is in Excel, but the table exists within an FME workflow, I am just showing it like this to make it easier to understand… hopefully!!!!!):
Asset_ID is my unique identifier. You will see there are either 3 or 4 duplicates of that number.
Column B “CHAR_TYPE_CD” has the values I want to turn into new column headings, combined with the existing column headings in C, D, and E.
This is ultimately what I want it to look like:
Note The values from the original Column B are transposed and combined with the previous column names. There are 4 individual attribute values in the original column B, namely:
CM-ELCNT; CM-GRPNG; CM-VOLVL; and CM-VN
Original column C “EFFDT” now becomes “EFFDT CM-ELCNT”
Original column D “CHAR_VAL” now becomes “CHAR_VAL CM-ELCNT”
Original column E “SRCH_CHAR_VAL” now becomes “SRCH_CHAR_VAL CM-ELCNT”.
This process is then repeated for the next value in original column B:
New columns created are EFFDT CM-GRPNG; CHAR_VAL CM-GRPNG; SRCH_CHAR_VAL CM-GRPNG and so on.
Importantly of course the relevant values of original columns A, C, D, and E all go into the newly named columns.
I have added the spreadsheet with 2 sheets in it, so you can see the data.
Any help warmly appreciated. Thank you in advance.
Stu