Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
utkuozan
New Contributor II

Disabling filtering of a dimension

I have a stacked pie chart which displays states of orders per year. My dimension is

=YEAR([Data.OrderDate])

and my measures are 

=Count({<[Data.State] = {'Open'}>} DISTINCT [Data.OrderNo]&'|'&[Data.State])

=Count({<[Data.State] = {'Closed'}>} DISTINCT [Data.OrderNo]&'|'&[Data.State])

=Count({<[Data.State] = {'Cancel'}>} DISTINCT [Data.OrderNo]&'|'&[Data.State])

My stacked vbar chart is one of many charts in the page. And I also have a filter pane which includes Order date as:

=YEAR([Data.OrderDate])

When I choose a specific year I want my stacked bar chart display all years regardless of Order date chosen, as it has never been filtered. How can I accomplish this?

Regards.

Tags (2)
Labels (2)
1 Solution

Accepted Solutions
poojashribanger
Contributor II

Re: Disabling filtering of a dimension


Try this
=Count({1<[Data.State] = {'Open'}>} DISTINCT [Data.OrderNo]&'|'&[Data.State])

=Count({1<[Data.State] = {'Closed'}>} DISTINCT [Data.OrderNo]&'|'&[Data.State])

=Count({1<[Data.State] = {'Cancel'}>} DISTINCT [Data.OrderNo]&'|'&[Data.State])

View solution in original post

10 Replies
albert_guito
Contributor II

Re: Disabling filtering of a dimension

Hi,

You can use the identifier {1} in the set analysis of your chart to ignore the user selections.

Ag+
Ag+
utkuozan
New Contributor II

Re: Disabling filtering of a dimension

If I would have been using an aggregate function such as SUM, COUNT or AVG I would have been placing {1} inside the function, but where should I place the {1} in this expression?

=YEAR([Data.OrderDate])

Partner
Partner

Re: Disabling filtering of a dimension

why do you need a filter for year ?
utkuozan
New Contributor II

Re: Disabling filtering of a dimension

That is the problem. I need year filter for other charts and tables in the report but not this one. I am using year to create x-axis values in my chart.

My stacked-bar chart already displays Order for all available years and I do not want it to get filtered by year when I filter other charts and tables on the same page. I want to stay still whatever the year filter is set to.

Highlighted
Partner
Partner

Re: Disabling filtering of a dimension

you can do as below:
=Count( {< [Data.State] = {'Open'}, [Data.OrderDate] = >} DISTINCT [Data.OrderNo] & '|' &[Data.State] )
I hope it helps.
utkuozan
New Contributor II

Re: Disabling filtering of a dimension

Thank you very much for your help. But my page still filters when I select a year from the filter pane.

Partner
Partner

Re: Disabling filtering of a dimension

did you add
, [Data.OrderDate] =
in all your chart expressions ?
albert_guito
Contributor II

Re: Disabling filtering of a dimension

You have to add the identifier in your expressions but if you need the chart responds to other filters you can ignore in the modifier of set analysis the order date { .... , Data.OrderDate=, ...}
Ag+
poojashribanger
Contributor II

Re: Disabling filtering of a dimension


Try this
=Count({1<[Data.State] = {'Open'}>} DISTINCT [Data.OrderNo]&'|'&[Data.State])

=Count({1<[Data.State] = {'Closed'}>} DISTINCT [Data.OrderNo]&'|'&[Data.State])

=Count({1<[Data.State] = {'Cancel'}>} DISTINCT [Data.OrderNo]&'|'&[Data.State])

View solution in original post