Qlik Community

Qlik Sense Enterprise Documents

Documents for Qlik Sense related information.

Using Search object in Qlik View/Sense

jmvilaplanap
Valued Contributor

Using Search object in Qlik View/Sense

Intro

Normally we know this thanks at our experience, but when we need to explain it to a user is more difficult (at least for me).

We have several types of search:

  • Normal
  • Literally
  • Wildcard
  • Condition
  • Combinations
  • Numbers

I will not speak about fuzzy search because I don't know how exactly works, and I don't use it because this reason.

In this example, we have this values in a field (I know, there are like a Soap Opera names ):

  • Juan Antonio Perez
  • Carlos Javier Rodriguez
  • Pablo Ruiz
  • Juan Javier Ruiz
  • Marta Maria Lopez
  • Jose Jorge Perez
  • Javier Jesus Domingo
  • Pablo Jabier Minguez

Search Types

Normal

Is the type of search that everybody use, just write your string and something will appear. Is like do an "or" operation between words, if you write javier (the searchs are not case sensitive) the results will be:

  • Carlos Javier Rodriguez
  • Juan Javier Ruiz
  • Javier Jesus Domingo

Literally

This type is useful if you know exactly the string to search, with spaces or whatever you need, but is not necessary write the full string, for example if we write "Carlos Javier" the result will be:

  • Carlos Javier Rodriguez

Wildcard

We have two types of wildcards, the asterisk (*) and the interrogation (?), the first one is for substitute a string and the second one to substitute a character, for example, if we are looking for a javier in the beginning, we must to write javier*, then the result will be:

  • Javier Jesus Domingo

If we want to look for a javier in the second name, we must to write * javier * with spaces and the, the result will be:

  • Carlos Javier Rodriguez
  • Juan Javier Ruiz

And now, we want to have all the javier but we know that the person that put the names in the database is not a good speller, and some names are not well write, for example "Jabier" (OMG), then we need to write in the search object *ja?ier* and the results will be:

  • Carlos Javier Rodriguez
  • Juan Javier Ruiz
  • Javier Jesus Domingo
  • Pablo Jabier Minguez

We also use more than one ?, for example if we use ?a?ier, we can find to Xabier, like the professor of X men

Condition

Maybe we want to look for a Perez but not Juan, then we can use the symbols + and -, for example: perez -juan will have the following result:

  • Jose Jorge Perez

Or for example, we need to find a perez but only juan, we will write +perez +juan:

  • Juan Antonio Perez

Combinations

In several times, you must to find something with more than one rule, then the way to do it is to use pipes (|), in this example we want to find all the Ruiz and all the Javier that aren't Jesus. ruiz | javier -jesus, with this, the result will be:

  • Juan Javier Ruiz
  • Carlos Javier Rodriguez
  • Pablo Ruiz

Numbers

For this example, we will use a table with numbers from 1 to 20.

This is similar to string search, but with some special cases, for example, what happen if we write a 1 in the box?, will appear all the numbers that begin with 1, the 1 and from 10 to 19.

If we can look for a exactly the 1, we must to write it in between brackets (1), and with this we will have only the number one.

Is possible to look for a numbers greater than 5 if we write >5 in the box, or greater or equal than >=5 even we can use this expression >5 <=7 to obtain 6, 7.

Inline tables for the examples

LOAD * INLINE [

    F1

    Carlos Javier Rodriguez

    Juan Antonio Perez

    Pablo Ruiz

    Juan Javier Ruiz

    Marta Maria Lopez

    Jose Jorge Perez

    Javier Jesus Domingo

    Pablo Jabier Minguez

];

LOAD * INLINE [

    F2

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    13

    14

    15

    16

    17

    18

    19

    20

];

Comments
kkkumar82
Valued Contributor III

Hi Jose,

Thanks for your points here, I suggest putting all in a qvw file with expressions is a better for beginners

Version history
Revision #:
1 of 1
Last update:
‎06-29-2017 05:08 AM
Updated by: