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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filtering listbox on: Only numbers.

Dear all*,

I think Ive got a straight forward and simple question, yet I could not find a corresponding topic.

I've got a listbox with expression: =Left(information, 2) selecting only the 2 first values of the information. Its all numbers, but there is some trash in the data source which are letters. (And a dropdown box?....)

How can I filter anything but numbers out of my listbox?

Thx in advance!

1 Solution

Accepted Solutions
awhitfield
Partner - Champion
Partner - Champion

Hi Dutchsky,

try this out: if(IsNum(Left(DATA,2)),(Left(DATA,2))) Example attached

Andy

View solution in original post

5 Replies
tresesco
MVP
MVP

Not IsNum(YourField) ?

And if you are looking to discard the sub-string, try using PurgeChar(), like:

PurgeChar(YourField, '0123456789')

Not applicable
Author

Hi thx for the suggestion, but its not working because of this I think:

The raw data is in this format:

00-00

01-34

02-24

TEXT

etc.

So when I set my expresion:     =Left(information, 2)      The following is shown:

00

01

02

TEXT

Now the TEXT is also unwanted. But If I say in my expresion:

=Left(YourField, 2)

  =Not IsNum(YourField)

Nothing is shown, probably because it looks at the original raw data, which contains a "-" sign.

Got any alternative suggestions?

sibideepak
Creator II
Creator II

Hi Dutchsky,

This may helpful!!

And try with this

left( Date, index( Date,'-') -1 ) where Date = 1997-07-14 returns 1997

awhitfield
Partner - Champion
Partner - Champion

Hi Dutchsky,

try this out: if(IsNum(Left(DATA,2)),(Left(DATA,2))) Example attached

Andy

Not applicable
Author

Exactly what I needed! Thanks alot! Also Deepak Sibi thanks for your input, maybe I can use that another time. My example were not dates though.

Thank you