Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to limit the values to display in list box

Hi,

I am new to Qlik View. I have a small doubt in the list box. I have a list box which displays all the values which loaded from the Excel file.

I want to limit the digits from 4 to 3. i.e., from the below image I  want it to display (170,160,150,100) instead of (1700,1600,1500,1000).

qvw.png

Thanks in advance.

4 Replies
swuehl
MVP
MVP

Try something like this in your list box (using a field <expression>)

=If(ProductID >1000, ProductID/10, ProductID)

or use a similar transformation already in the load script.

Not applicable
Author

Hi,

You can achieve this by using "Left" function in Listbox expression instead of using Field, select last option "Expression".

Left(Field_Name,3)   ====>> Returns left portion with 3digits.

I Hope, it helpfull to u.

ziadm
Specialist
Specialist

Add the following the list box expression

num(If ([Product ID] > 1000, [Primary Contact]/10,[Product ID]),'###0')

sunny_talwar

Are you going to have numbers beyond 9999 to be transformed to 3 digit as well? May be this:

Num#(Left(Trim(FieldName), 3), '##')

or a more complex if statement:

=If(ProductID >1000000, ProductID/10000,

  If(ProductID >100000, ProductID/1000,

  If(ProductID >10000, ProductID/100,

If(ProductID >1000, ProductID/10, ProductID))))