Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Tags (1)
1 Solution

Accepted Solutions
arulsettu
Honored Contributor III

Re: Where clause as a chart filter

try this in chart expression

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

it will show age count only for USA

4 Replies
MVP
MVP

Re: Where clause as a chart filter

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

MVP
MVP

Re: Where clause as a chart filter

Also read about set analysis in the attached document:

arulsettu
Honored Contributor III

Re: Where clause as a chart filter

try this in chart expression

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

it will show age count only for USA

Not applicable

Re: Where clause as a chart filter

Hi Sunny,

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

Community Browser