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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need Subfield load expression for Different formats

Hello everyone,

I have 2 different qvd files which have same columns but i need to trim leading two zeros (if it has in the beginning, else load as it is) before joining them. I think i can use SubField function in the load script but none of the formats i specified worked. Following are the data formats from those two files.

IDformat1.JPG                              IDformat2.JPG

TIA,

James

3 Replies
robert_mika
Master III
Master III

Try

if(Left(yourfield,2)='00',Mid(Yourfield,3,len(yourfield)), yourfiled) as Yourfiled

rubenmarin

Hi James, can you try the Num() function?, ie:

Num(FieldName) as FieldName

To load string and numbers you can use: If(IsNum(FieldName), Num(FieldName), FieldName) as FieldName

sunny_talwar

May be like this:

Alt(Num(Num#(FieldName)), FieldName) as FieldName