Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to evaluate values of fields at the data loading

Hello expert,

I have a question about data load with subfield() function.

For example,

C1 |C2   | C3

------------------

a  | x/y | m

b  | y   | n

c  | y/z | n

d/e| x   | m

In the above table, some columns contains multiple values with separater '/' and

they should be splited. But I'm not sure what column has multiple values before

loading data.

Simply writing is loading ALL fields with subfield(), but it is not smart.

LOAD

subfield(C1, '/') as C1,

subfield(C2, '/') as C2,

subfield(C3, '/') as C3

...

I'd like to make the logic which evaluate the values of each field at loading.

Does anyone help me?

Thank you,

4 Replies
Not applicable
Author

what format is the data you are loading in? Can you use the "delimeter" option on loading?

Not applicable
Author

Hear '123455' this is string formate time .hear how to use delimete ,i.e.time is 12-34-55 whate is function  used for written delimeter  replay fast friends

somenathroy
Creator III
Creator III

You may use:

 

LOAD

Regards,

som


if(Index(C1,'/') > 0 ,SubField(C1,'/'),C1) as C1,
if(Index(C2,'/') > 0 ,SubField(C2,'/'),C2) as C2,
if(Index(C3,'/') > 0 ,SubField(C3,'/'),C3) as C3

somenathroy
Creator III
Creator III

You may do custom format like :

Left(Fld_name,2) & '-' & Mid(Fld_name,3,2) & '-' & Right(Fld_name,2)

Regards,

Som