Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Searching in listboxes of numerics

Hi,

I try to undestand how QlikView searches listbox with numbers

when user wirtes different expressions in a small separate windows

above of this listbox.

I have listbox in Tutorial Qlikview where is example for "Population (mio)".

  1. When I write the exact value (for example "13.4"),
    the correct line is then selected and after ENTER it becomes green ... O.K.
  2. When I write ">999", two correct lines are selected (1 194.43 and 1342.49)
    and after ENTER they become green ...O.K.
  3. When I write "<999", fourteen corect lines are selected
    and after ENTER they become green ... O.K.
  4. When I write "=999", 37 lines are selected and after ENTER they become green
    and here is my question: All these selected lines are less then 0 and greater then 1.
    Is it correct behaviour of QlikView or a bug?

    The same behavioure QlikView presents, when I write the only character: "=".

Thanks,

Mirek

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Mirek,

I believe with just typing a number, you will actually performing a text search, so you should be able to find and select 13.4 also by just typing 1 or 13 and press enter (but this will also include the other values that starts with 1 or 13). So you perform a search matching your search phrase with the beginning of the values to search in.

When you use a preceding >, <, >= or <=, you will perform a numeric search as you stated (you can also combine to ranges, like >10<20)

When using a preceding equal sign, you are actually starting an advanced search (please check also the Help for search), where you basically define a boolean expression and QV will return all records where the expression returns true.

So, when entering =1, all records will be selected (same for any other number except 0).

You wouldn't use an advanced search with a constant, but with something like

=sum(Sales)>10000

when operating the search on a customer fields (select all customers with sum(Sales) larger than 10000).

I don't know why you get anything selected with just typing =, or what you described with "All these selected lines are less then 0 and greater then 1."

So it might be useful if you could post a small sample application so we see what you are talking about.

Regards,

Stefan

(please note that there are also different search modes available in list box properties)

View solution in original post

4 Replies
swuehl
MVP
MVP

Mirek,

I believe with just typing a number, you will actually performing a text search, so you should be able to find and select 13.4 also by just typing 1 or 13 and press enter (but this will also include the other values that starts with 1 or 13). So you perform a search matching your search phrase with the beginning of the values to search in.

When you use a preceding >, <, >= or <=, you will perform a numeric search as you stated (you can also combine to ranges, like >10<20)

When using a preceding equal sign, you are actually starting an advanced search (please check also the Help for search), where you basically define a boolean expression and QV will return all records where the expression returns true.

So, when entering =1, all records will be selected (same for any other number except 0).

You wouldn't use an advanced search with a constant, but with something like

=sum(Sales)>10000

when operating the search on a customer fields (select all customers with sum(Sales) larger than 10000).

I don't know why you get anything selected with just typing =, or what you described with "All these selected lines are less then 0 and greater then 1."

So it might be useful if you could post a small sample application so we see what you are talking about.

Regards,

Stefan

(please note that there are also different search modes available in list box properties)

Not applicable
Author

Stephan,

thank you very much for your GREAT answer. It have explained to me all my questions of numeric searching in listboxes!

And now to your questions:

  1. My sentence "about less then 0 and greater then 1" was my MYSTAKE,
    I have find that ALL values were selected after my writing of "=999".
    I apologize for it!

  2. And now I want to explain WHY I have written the sign "=".
    I wanted to indicated that I want to NUMERIC comparison, not STRING comparison.
    And when you explain it to me, I see thatQlikView uses Excel-like syntax for caling functions
    (with "=" prefix) and this was for me unknown till now.

So thank you very much for efficient answer and great examples (for ranges).

Mirek

swuehl
MVP
MVP

Maybe I am missing something, but if you want to search for exact value of e.g. 14 and you don't want 142 returned, you can use something like

=FIELD=14

Not applicable
Author

Thanks Stephan for your add,

it functiones exactly like you wrote:

  • I have listbox Day with values 1, 2, ..., 31).
  • I want to get exactly the value 2 (not list 2, 20, 21, 22 etc.).
  • When I write like condition 2, I get list 2, 20, 21, ..., 29.
  • When I write like condition =Day=2, I get only number 2.

Thank you.

Mirek