Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Normalize 2 (or more) columns at the same time

Hello,
I knew that we can do the normalization for 1 column to multiple rows by using tNormalize. And we also can do do the normalization for 2 column by using tNormalize + apply java code. tNormalize 2 columns
My question is: Is there any way that allow me to do normalization for 2 columns (or more) at the same time (same steps). Meaning I just need to write java code to define the function and can apply it for all the columns that I want to normalize? Or Is there any provided function that can help me do that.

My Input:
row1;blue,green;1,2
row2;black,white,red;3,4,5
My expected results:
row1;blue
row1;green
row1;1
row1;2
row2;black
row2;white
row2;red
row2;3
row2;4
row2;5
Thank you and Best Regards,

Labels (2)
1 Reply
Anonymous
Not applicable
Author

There is no a built in function can be used to do the normalization now. For your example, you can achieve it simply with tNormalize component. If you want to normalize 2 or more column at the same time, I think you need to split the columns into multiple flows, eg:
c1;c2;c3;c4==>flow1: c1;c2
                       flow2: c3;c4
Then, do the normalization on each flow, do an inner job to merge all the columns from the two flows.