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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

Labels (1)
3 Replies
robert_mika
MVP
MVP

Try

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

rubenmarin
MVP
MVP

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
MVP
MVP

May be like this:

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