Which product are you trying to do this in classic FDM or FDMEE?
thanks for the reply,
We are working on FDMEE, on cloud services.
If you are working on FDMEE on cloud services then your options are very limited as there is no scripting support in the cloud due to security restrictions. Therefore you have one of two options.
1) Format the file on premise so that the data is in the format you require.
2) Have multiple import formats, one for each of the values stored against the accounts in the columns and incrementally build up your complete dataset at the import step before exporting to your target application.