Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ladislav
Contributor III
Contributor III

Limit search object results by set analyzes

Hi,

I have couple of different data sources in my model. Financial, Sales, Product. They all use a bit different country names.
I have only one 'CountryName' field and therefore those results mix up. When I use search object I get 3 results for single search string.
I can easily resolve it using set analyzes, (limiting data source) in other objects but there is no way to use set analyzes for search object fields, is it?

Thanks

1 Solution

Accepted Solutions
ladislav
Contributor III
Contributor III
Author

I like the idea with alternate states, as I already use them for each report but even when I lock the FACTYPE_ID the search results give me Country also for other FACTYPEs even though they don't apply when selected.

Of course I have same state on all objects. See below. There is no Austria in MS FACTTYPE_ID. But there is search result for it.

set anlyzes.PNG
Is there a way to make set analyzes in search object? For example in list of fields? So there will be no search results for Austria in this sheet which has FACTTYPE_ID=MS?

Capture.PNG

Thanks

View solution in original post

13 Replies
marcus_sommer

For this you could use mapping - see here an example from HELP:

Mapping1:

MAPPING LOAD * INLINE [
x,y

US,USA

U.S.,USA

America,USA

Amerika,USA];

Map1:
mapping load * inline [

x,y

1,eins

2,zwei

3, drei ] ;

ApplyMap ( 'Map1', 2 )

liefert

zwei

ApplyMap ( 'Map1', 4 )

liefert

4

- Marcus

pokassov
Specialist
Specialist

I agree with Marcus.

If the same data in different data sources have different writing then someone have to rearrange data.

ladislav
Contributor III
Contributor III
Author

Marcus thanks for your reply.

I think your advise means fixing different country naming’s on the source and than using this new field in search object.
But that doesn’t solve my issue.

That is because these differences are relevant for each department/data source.

I have 3 different data sources and 3 different set of reports in one model. Depending on the particular report I need to search for data only in the relevant data source to get correct searcg results. That is why I was wondering if I can use set analyzes on fields in search object somehow.

This is not a problem of just a Country_Name field. There are other fields shared across the model.

I have one facttable where data from all sources are alltogether. Data sources in this facttable are differentiated/recognized by FACTYPE_ID= A, B or C.

ladislav
Contributor III
Contributor III
Author

Hey pokassov,
thanks for yor reply but that is not the solution I need. Could you please check my response to Marcus?

Thanks, I appreciate.

pokassov
Specialist
Specialist

May be you can use different states and lock FactType?

Then you can't choose wrong country.

Of cause you have to use set analysis to choose selected countries in state.

Безымянный.png

Sergey.

marcus_sommer

If you a field for the datasource like FACTYPE_ID used in your datamodel you could use this as filter in set analysis expressions. If you really need different fields for the same kind of information you could use an approach like translating different languages - How to Handle Multi-Language Translations in QlikView.zip - or you used these different fields only within the special sheets maybe matcht per a variable over getactivesheetid(). Then your fields will be fit to each sheet and if an user searched in this fields they will only see these data - by using a searchbox you will need to restrict the fields - eventually you could also use alternate states.

- Marcus

ladislav
Contributor III
Contributor III
Author

I like the idea with alternate states, as I already use them for each report but even when I lock the FACTYPE_ID the search results give me Country also for other FACTYPEs even though they don't apply when selected.

Of course I have same state on all objects. See below. There is no Austria in MS FACTTYPE_ID. But there is search result for it.

set anlyzes.PNG
Is there a way to make set analyzes in search object? For example in list of fields? So there will be no search results for Austria in this sheet which has FACTTYPE_ID=MS?

Capture.PNG

Thanks

ladislav
Contributor III
Contributor III
Author

"by using a searchbox you will need to restrict the fields - eventually you could also use alternate states."


That is what I am looking for. I have one field and more data sources in it. I know set analyzes syntax but I don't know how to use it in search object. What would be the syntax here?

Thanks


marcus_sommer

Have a look on the option "search in excluded values" in tab presentations. If this don't work I think you will need a specialized search-object on each sheet and using these different fields for the search.

- Marcus