Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
hic
Former Employee
Former Employee

One of the strengths of QlikView is its search engine. With it, you can find pieces of information in a fraction of a second and select the found field values. The response is immediate, which is necessary for the user experience. Without it, you would easily get an empty result set without understanding why.

 

Search strings can be made in many different ways, and QlikView will respond differently depending on how the search string is defined. Normally you just enter a text, and QlikView will match this against the beginning of the words in the field values. If several strings are entered, QlikView will return the union of the matches of each of the strings.

 

search multi.png

 

But if you instead use a wildcard in your search string, the evaluation of the search string will be made in a different way: the entire search string with the wild card will be matched against the entire field value, sometimes yielding more matches, sometimes fewer.

 

search h.png

 

If you want to create more complex search strings (and e.g. store them in actions or bookmarks) you can do this too. Just use (, |, & and double quotes to define the syntax.

 

search compound.png

 

In all the above cases, the search and the selection are made in one and the same field. But sometimes you want to make the selection in one field, but make the search in another. This can be done using the associated search, which is an indirect search method. Start with the field where you want to make the selection, enter the search string, and click on the small chevron to the right. You will then get a list of other fields containing this search string. By clicking the desired match, you will narrow down the number of matches in the primary list to show just the relevant values. You can then make your selection by hitting Enter.

 

search indir.png

 

Further, did you know that

  • In the user preferences and in the list box properties, you can define how a default search string should be created, but this does not affect how it is evaluated – only how it is created. Once created, you can add or remove wild cards as you please.
  • When you make a search and save the resulting selection in a bookmark, the bookmark will contain the search string and not the list of selected values. When the bookmark is applied, it will perform the search and select the found values. If data has changed, this may imply a different search result than before.
  • You can use the same search string in many places: In list boxes, in Set analysis, in the Advanced search dialog, in actions and in bookmarks.

 

Bottom line: The search string is a powerful tool that helps you find the values you want. Use it.

 

HIC

 

Further reading related to this topic:

Search - But what shall you find?

The Search String

The Expression Search

33 Comments
kalyandg
Partner - Creator III
Partner - Creator III

hi HIC,

interesting blog

0 Likes
2,336 Views
Not applicable

Henric, thank you for briging this much-ignored functionality to our attention. You mention the use of Bookmarks and I was wondering if you could help me with my query regarding Bookmarks with Dynamic Target Line on a Bar Chart: http://community.qlik.com/thread/96235


0 Likes
2,336 Views
Anonymous
Not applicable

I can't believe after all these years that you are still teaching me new things! Excellent description. You mention it at the end, but I would love to see a future article explain the tight relationship between Set Analysis and Search. Many times I will use a listbox search to test my Set Analysis expression - especially for numeric search and dates.

2,403 Views
swuehl
MVP
MVP

Henric,

I appreciate another of your famous blog posts, nice and clear.

Regarding

(*o* & *nn*)

the ampersand character used here is more a logical operator than a string concatenation operator, right?

Can we find any comprehensive information about the search syntax somewhere?

Honestly, I think the search feature is not really well documented.

Is there any kind of syntax description like the one attached to the set analysis HELP page (BNF style)?

So one can at least see what might be worth trying as input?

If there isn't such a thing yet (and even if so), I also hope for a continued series on this topic, but please also follow up on the "basic" search features / syntax.

I believe there will be a overwhelming appreciation in the community.

Regards,

Stefan

0 Likes
2,403 Views
hic
Former Employee
Former Employee

Stefan

The ampersand:

Yes, the ampersand is indeed a logical operator (which incidentally can be replaced by the word "and").

Comprehensive documentation:

The compound search using brackets is still fairly new and I admit that it has not been well documented. Neither have some of the other search methods... We need to fix that, I agree. We are currently re-writing a lot and the technical writers and I have an ongoing communication. So I hope that we can deliver that later. Meanwhile, maybe I should write a Technical Brief on this...

HIC

0 Likes
2,403 Views
philip_doyne
Partner - Creator II
Partner - Creator II

Dear Henric,

This does relate to your current search blog but it may be more for the advanced contribution everyone is hoping for!

I know  the search allows you to do an associated selection – eg Give me all the suppliers who have purchases > 10,000.   Can you do a selection that says “Give me all the suppliers that make up 80% of total sales” (for the current selection obviously).  

If you can can you help with a requirement I have which is to produce a bar chart with two expressions (dimension will be year)

Expression 1:  Total Number of Suppliers

Expression 2:  Number of suppliers making up 80% of total purchases

I have got as far as thinking we may need to use P() in a Set Modifier but I am not sure what the Search Criteria would be.   I am finding that this is not quite a straightforward as it feels it should be!!

Thanks

Philip

PS - Welcome ideas from any followers too!

0 Likes
2,403 Views
hic
Former Employee
Former Employee

What you are trying to do has many names: Pareto analysis, ABC analysis, etc. Unfortunately, this is not simple. But you should look at the "Pareto Select" under the actions.

HIC

0 Likes
2,403 Views
philip_doyne
Partner - Creator II
Partner - Creator II

Dear Henirc - I know it is not simple - that is why you are such a good person to ask 🙂  We will keep trying but will still welcome all suggestions - I do think it is a useful thing to be able to do.   Philip

0 Likes
2,403 Views
swuehl
MVP
MVP

I think it would be helpful (not only for pareto analysis) if one could set the sort order of advanced aggregation to other than load order (e.g. y-value 😉 )

2,375 Views
philip_doyne
Partner - Creator II
Partner - Creator II

Dear HIC,   Thanks for the pareto select suggestion, however will that not make the selection in all the fields.  I think what I need to be able to do is to make this selection as part of a set.   I could apply the Pareto Select "On any select" but that would change the selection I had just made (dodgy). If I had the second expression in an Alternate State maybe I could trigger the Pareto Select to act on a field in that state?  What does the great HIC Calculation Engine think!  Philip.

0 Likes
2,375 Views