Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 |
2 | 10 or more times | 10 |
3 | 12 months or more | |
4 | 18-24 | |
6 | 18 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
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
];