About EasyMorph Tutorials & Examples Web-help

Apply transformation to multiple columns


#1

I had 29 columns that needed to have the following transformation:

iferror(parsefloat([Col1]),0)

The incoming file had all the data in scientific notation with "NA" for nulls which I needed to replace

I ended up just highlighting all 29, using the trim operation, and then editing the XML with some find/replace. Is there a better way to apply a transformation like this to many columns?


#2

It sounds like you're working with a matrix table. The best way to deal with matrix data is to unpivot it first (using Unpivot transformation), transform as needed (all data will be in 1 column), then pivot it back as the last step.

Tip: You may want to use aggregation type Any for pivoting back.

See also https://community.easymorph.com/t/can-i-increment-a-parameter-in-my-expression/59