Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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