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

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.

Labels (2)
1 Solution

Accepted Solutions
poojashribanger
Creator II
Creator II


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
Creator II
Creator II

Hi,

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

Ag+
Ag+
Anonymous
Not applicable
Author

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])

agigliotti
Partner - Champion
Partner - Champion

why do you need a filter for year ?
Anonymous
Not applicable
Author

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.

agigliotti
Partner - Champion
Partner - Champion

you can do as below:
=Count( {< [Data.State] = {'Open'}, [Data.OrderDate] = >} DISTINCT [Data.OrderNo] & '|' &[Data.State] )
I hope it helps.
Anonymous
Not applicable
Author

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

agigliotti
Partner - Champion
Partner - Champion

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

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
Creator II
Creator II


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])