Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
arusanah
Creator II
Creator II

Qlik Scripting

HI Qlikers ,

i am working with survey data where I have two columns  Code and now . for my analysis I need to create metrics for highest and lowest rating . so I am thinking of creating a new column based out of my second column.

code

name

new column

1

10 Extremely likely

10
210 or more times10
312 months or more 
418-24 
618 to 24 

 

i could have done it at SQLdata pull  level  using

 regexp_replace(string,'[^[:digit:]]',' ')

 

but due to some logic issue i need to achieve this in Qlik.

 i tried using

KeepChar(string,'0123456789') &

Purgechar(string) functions.  but i get numbers for all rows. where as i should be getting it only for first two rows.

so what is alternative of resexp_replavce () in Qlik.

 

any help is greatly appreciated.

 

Thanks

Labels (1)
2 Replies
Saravanan_Desingh

can u try this?

tab1:
LOAD *, If(RowID<=2, KeepChar(name,'0123456789')) As [new column];
LOAD RecNo() As RowID,* INLINE [
    code, name
    1, 10 Extremely likely
    2, 10 or more times
    3, 12 months or more
    4, 18-24
    6, 18 to 24
];
Saravanan_Desingh

commQV42.PNG