Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter data using a checkbox

In my data model I have a table that is related with other tables. This table has a column among others, let's say data_validated, which may have two values, 0 or 1. If its value is 0, indicates data is not validated, otherwise data is considered validated (1).

In my dashboard, I show data using different types of objects, charts, tables, etc. but now I want to put a checkbox.

The functionality of this checkbox would be:

If I check it, I want to show in my dashboard data that is ONLY validated (data_validated=1), otherwise, if I uncheck I want to show all data, validated (data_validated=1) or not (data_validated=0).

As Qlikview filters data automatically depending on the filters set, it will show the correct data in my dashboard depending on if I check or uncheck this checkbox since this table is associated through a column with other tables in my data model.

How can I do this?

1 Solution

Accepted Solutions
8 Replies
adamdavi3s
Master
Master

Hi,

I am assuming you don't simply want a list box which has 0 or 1 selectable with a checkbox but actually just one individual check box? (which can obviously be done with "windows checkboxes" option

If so then Rob is your man, the cookbook section for true/false has exactly this:

http://qlikviewcookbook.com/list-recipes/#squelch-taas-accordion-shortcode-content-33

Kind regards


Adam

Please remember to mark this as helpful or the correct answer if I have helped you or answered your question.

This will help users identify the answers should they come across this thread in the future.

Not applicable
Author

Yes, this is what I want. From your example, I am interested in option 2, using checkbox but how can I set or remove the filter once checkbox is checked or unchecked respectively? By set/remove filter I mean to just show information which column data_validated is 1 in my data model table.

adamdavi3s
Master
Master

Please see the attached for one way of doing it.

You could also use a field trigger on the field used as a checkbox if you wanted to limit the whole dashboard

Kind regards

Adam

adamdavi3s
Master
Master

here is the field trigger version just for giggles

Not applicable
Author

I have implemented your solution, but in my case table is not filtered by data_validated. I load this table into QlikView from SQL Server. In SQL server, field data_validated is defined as Bit (0 or 1). As for Qlikview False is always presented as 0 and True is -1, to avoid problems when I load data from SQL into Qlikview, I multiply by -1 to make it positive. So once my table is loaded it has values 0 or 1 for field data_validated. So I have set the trigger as yours:

=if(GetSelectedCount(validatedflag) =1,1,'')

But for some reason, filter is not applied correctly on table. I have added a table object to my document to test it and it is not working. What Am I doing wrong?

adamdavi3s
Master
Master

Have you added the 'on change' filter as well, there are two triggers on the one field which are needed to make it work.

If you still get issues, can you provide a cut down version of your qvw? (limit load and scramble any fields you need)

Not applicable
Author

Two triggers? I only have set 'on change' filter. I have only seen one trigger, that in document settings->triggers->event on field->on change, on validatedflag. Where is the another one you say?

adamdavi3s
Master
Master

Capture.PNG