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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Confusion in using Subfield in load script as well as in expression

Hey ppl,

In one of a qvd i have column with values like,

ABCD-0070085158
BSCD-0070085178
JKRF-0070085153
QOPD-0070085238

I want to display the values like ,

70085158
70085178
70085153
70085238

I tried SubField(ID,'0') as NewID in the script , but it doesn't work

I tried the same by simply loading the data like Load ID as OldID and used SubField(OldID,'0') in the expression in the Pivot Straight table, but no luck

I think this is because, there are multiple zeros in between the data.  How do I display as desired ? Any other substring kind of functions will help or any workaround solution?


TIA,

James



11 Replies
Not applicable
Author

Doesn't work as expected

sunny_talwar

Seems to be working well for me

Table:

LOAD *,

  SubField(ID,'-', 2) * 1 as NewField;

LOAD * INLINE [

    ID

    ABCD-0070085158

    BSCD-0070085178

    JKRF-0070085153

    QOPD-0070085238

];


Capture.PNG

What issue did you run into?