Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create a filter

Greetings,

I am using Qlikview 10 personal edition.

I would like to ask you how to create a filter in Qlikview.

Actually I have created tow straight boxes there I have included wo labels one is "Matching_status' which is showing whether the record is "matched" or "unmatched" and another one is "service_status" which is showing whether it is "included" or "excluded".

When I am creating a listbox and in general tab, in the field section when I am giving the expression as " if(x=y, 'Included', 'Excluded').. it is showing me two fields as Included, Excluded in the listbox.. But default is taking the first one and the second one is not functioning at all..

Hope you are all getting my point.

Please explain how to resolve it.

23 Replies
Not applicable
Author

Hello Bert,

Please find attached of the file.

By seeing this picture you will able to know that what exactly I want to explain you.

You can see there are two straightbox tables.

Account_Aspen vs Account_medpages in this table I am compiring data from two different data sources one is from aspen another is from medpages.

Like wise in Contact_aspen vs Contact_medpages.

Now I have to create flags which will filter only matched/unmatched/included/excluded.

I have gone through the script which you have posted. But do you think for creating flag(filter) I need to write those script.

If yes then how. Each table has data from two different datasources..

And now I am totally confused and lost.

Not applicable
Author

See attached example report

Not applicable
Author

Hi Bert,

Your example is Perfect.

You are using "dataA" and "matchedA".But thing is that the "matchedA" field is defined by me.. Acually it's a label and I have written the expression for it.

And it is not possible to define one by one which is matched or unmatched as there are billions of records.

That's the problem why I can not able to do it.

Any other solution is there.

Please have a look on that .bmp file which I have sent you.

There you can able to see two straighboxes are created i-account_aspen vs account_med ii- contact_aspen vs contact_med.

The first table contents are :

orgcode, aspen_orgname, med_orgname, aspen_orgstatusname, med_orgstatusname, aspen_orgtypename,med_orgtypename,postal_street, med_postalstreet, shipping_street, med_shippingstreet, Matching_status.

Matching_status field is added by me actually it's a label and the expression is "

if(med_orgname=aspen_orgname and med_orgstatusname=aspen_orgstatusname and med_orgtypename=aspen_orgtypename

and postal_street=med_postalstreet and shipping_street=med_shippingstreet,'matched','unmatched')".

The fields in 2nd table :

personcode, aspen_initial, med_initial, aspen_firstname, med_firstname, and so on....

In second table service_status is a label and the expression is

if(aspen_person_service=med_person_service, 'Included', 'Excluded')

.

Now I have to add flags which will filter only matched/unmatched/excluded/included.

Note: Aspen and medpages are two different datasources from which data are loading.

May be this explanation will make you clear what I am trying to convey .

Not applicable
Author

Do you mean something like this

Not applicable
Author

Finally I have succeeded. 

Don't know how to thank you...

You have rescued me from a big trouble. Thanks a ton.

Not applicable
Author

You can replace the inline loads with normal loads from database, excel files or whatever datasource you use.

Regards,

Bert

Not applicable
Author

Hi Bert,

There is an issue I am experiencing; when I am joining it's giving me the duplicate "orgcode".

So I have used inner join.. Then also it is giving me the redundant values..

I think when I am joining it's join as crosstab join.

suppose orgcode, aspen_orgname, med_orgname

3, null, value

3,value,null

3,value,value

It's giving me this kinda output ...

How to get rid of it..

Not applicable
Author

Can you post the part of the script where you load the tables and perform the join?

Not applicable
Author

Let me explain you what I have done.

in edit script in the first tab I have loaded data from txt file ie aspen_org, in the 2nd tab med_org, in the 3rd tab I am loading as Inline.

The field names are same in aspen_org and med_org.

Not applicable
Author

Hi Sandeepa,

Why are you doing an inline load?

A join between the two tables should be sufficient.

Something like:

join(TableA)

Load suppose orgcode,

        aspen_orgname

resident TableB

It would ease things if you could post your complete script.

Regards,

Bert