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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dawgfather
Creator
Creator

Hard coding additional filters into a chart/text box

I am wondering how to add a "filter" to a chart or text box so that a "filter" is "hard-coded".

For example, I have a chart that displays the number of Yes/No results - the dimension is the field [Yes/No] and the expression is a simple "Count(Distinct [Names])". I want to add an additional criteria to the chart so that no matter what the Current Selections are at the time, the chart will always include ONLY those [Names] where they are of "Type = Current" - something similar to a WHERE command.

If I make the selection of the field Type and highlight "Current" I get the results I need, but I want to make it so I don't have to make that selection. I can then also make a text box that spells out "# confirmed = xxx" (the count of "Current" "Names" = "Yes") and "# Left to Confirm = yyy" (the count of "Current" "Names" = "No").

I have tried If statements and some others, but there has to be a rather simple expression to add in.

1 Solution

Accepted Solutions
sunny_talwar

You can use Set Analysis for that:

Count(DISTINCT {<Type = {'Current'}>} Names) or

Count(DISTINCT {1<Type = {'Current'}>} Names)

View solution in original post

1 Reply
sunny_talwar

You can use Set Analysis for that:

Count(DISTINCT {<Type = {'Current'}>} Names) or

Count(DISTINCT {1<Type = {'Current'}>} Names)