Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

How to evaluate values of fields at the data loading

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

Not applicable

Re: How to evaluate values of fields at the data loading

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
Contributor III

Re: How to evaluate values of fields at the data loading

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
Contributor III

Re: How to evaluate values of fields at the data loading

You may do custom format like :

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

Regards,

Som

Community Browser