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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikuser222
Creator
Creator

extract numericals?

Hi All,

I have filed values like

Start - 6 Days

Not Start - 7 Days

can any on please How can I extract numerical from the above field values??

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Just to offer another option (and there are lot more, have a look at the QV string functions in the HELP), depending on your exact requirements:

LOAD *,

  KeepChar(Text,'0123456789') as Number1,

TextBetween(Text, '-','Day') as Number2;

LOAD * INLINE [

Text

Start - 6 Days

Not Start - 7 Days

Started to early - -1 Day

2 times started - 2 Days

Worked part time - 0.5 Days

];

Text Number1 Number2
Start - 6 Days6 6
Not Start - 7 Days7 7
Started to early - -1 Day1 -1
2 times started - 2 Days22 2
Worked part time - 0.5 Days05 0.5

View solution in original post

2 Replies
sunny_talwar

Try this:

KeepChar(FieldName, '0123456789') as NewFieldName

swuehl
MVP
MVP

Just to offer another option (and there are lot more, have a look at the QV string functions in the HELP), depending on your exact requirements:

LOAD *,

  KeepChar(Text,'0123456789') as Number1,

TextBetween(Text, '-','Day') as Number2;

LOAD * INLINE [

Text

Start - 6 Days

Not Start - 7 Days

Started to early - -1 Day

2 times started - 2 Days

Worked part time - 0.5 Days

];

Text Number1 Number2
Start - 6 Days6 6
Not Start - 7 Days7 7
Started to early - -1 Day1 -1
2 times started - 2 Days22 2
Worked part time - 0.5 Days05 0.5