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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
ashmitp869
Creator II
Creator II

Help in the load script with right function .?

Hi All,

I have values in variable like -

3000001-77777

344444-8888888

444444

My req to get the values like below in load script -

77777

8888888

444444

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan
MVP
MVP

Hi

Try like below

Data:
LOAD SubField(F1, '-', SubStringCount(F1, '-')+1) as F1 INLINE [
F1
3000001-77777

344444-8888888

444444
];

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan
MVP
MVP

Hi

Try like below

Data:
LOAD SubField(F1, '-', SubStringCount(F1, '-')+1) as F1 INLINE [
F1
3000001-77777

344444-8888888

444444
];

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
rwunderlich
MVP
MVP

Don't forget that the 3rd parameter to subfield can be negative -- counts from right. 

SubField(F1, '-', -1) 

-Rob