Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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 (2)
2 Replies
Highlighted
Specialist III
Specialist III

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
];
Specialist III
Specialist III

commQV42.PNG