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: 
Not applicable

Where clause as a chart filter

Hi there,

I've been trying out qlik sense for a few days and have got the gist some basics like;

- adding datasets from an an ODBC database

- creating charts and cross tabs etc

- using filter panes to interrogate the above

What I'd like to do is assign a filter to an object like a chart, crosstab.

An example would be;

- Let's say the dataset I load consists of the fields age, name and country.

- I add a bar chart to qlik sense, add the name as the dimension and count(age) as the measure, but I only want to see records from a particular country as a fixed filter / condition/

An SQL example would look like

Select name, count(age)

From dataset

Where country = 'USA'

I might then add a 2nd chart to the same sheet but filter on a different country, thereby showing different results from the same dataset.

What are my options for achieving this is Qlik Sense?

Cheers

1 Solution

Accepted Solutions
arulsettu
Master III
Master III

try this in chart expression

count({<country={'USA'}>}age)

it will show age count only for USA

View solution in original post

4 Replies
sunny_talwar

You can use set analysis for filtering data. So for example, you can do like this:

Count({<country = {'USA'}>} age)

You can read about set analysis here:A Primer on Set Analysis

UPDATE: Fixed the link for the blog post

sunny_talwar

Also read about set analysis in the attached document:

arulsettu
Master III
Master III

try this in chart expression

count({<country={'USA'}>}age)

it will show age count only for USA

Not applicable
Author

Hi Sunny,

Thanks for this. I will need to read over this on the weekend to get my head around the syntax.