Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Possible to cut a number?

Hello,

I have a table with a Zip Code (5 numbers) and would select a range from e.g. 231-312. How is it possible to cut the zip codes in a Listbox to 3 numbers?

Much Greetings

Daniel

4 Replies
Not applicable
Author

Can't you use the mid(ZIP Code, 1, 2) function

Not applicable
Author

Daniel,

here are a simple way to group Zip Codes:

See the attached document and have a look in the script.

Rainer

Not applicable
Author

Dear Daniel,

Go in list box expression and write left(Zipcode,3). it will show only 1st three numbers of zip code in list box but does not change thier original value.

Not applicable
Author

You can use =subfield(ZipCode,'-',1) for the 1st 3 digits

OR

You can use =subfield(ZipCode,'-',2) for the last 3 digits

as listbox expression

Regards,

Sajeevan