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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
dawgfather
Creator
Creator

Hard coding multiple additional filters into a chart/text box

I have a previous discussion where I have been properly informed how to add a filter inside of an expression using something like the below:

Original question - 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.

Solution was to use " Count(DISTINCT {<Type = {'Current'}>} Names) "

My next question is, how do I combine multiple filters into the same expression, specifically using a wildcard function of some type. For instance I am trying to use the above example but now only looking for answers where the DATE field is in 2016. I have tried adding a WildMatch or even a LIKE command but cannot get anything other than an "Error in Expression"

I tried something like the below:

Count(DISTINCT {<Type = {'Current'}>} {<Date like {'2016'}>} Names)

or

Count(DISTINCT {<Type = {'Current'}>} {<WildMatch(Date, *2016*)>} Names)

but nothing works. Any ideas?

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be this:

Count(DISTINCT {<Type = {'Current'}, Year = {2016}>} Names)

Where Year is a field calculated in the script

Year(Date) as Year

View solution in original post

1 Reply
sunny_talwar
MVP
MVP

May be this:

Count(DISTINCT {<Type = {'Current'}, Year = {2016}>} Names)

Where Year is a field calculated in the script

Year(Date) as Year