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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Include values in set, but exclude when excluded from selection?

Hi, all.

I have a basic count of calls when a "type" value is set to Residential:

SUM({<$(=vDateAlias)={">=$(=vRangeDate1)<=$(=vRangeDate2)"}, callType={'Residential'}>}[Call Count])

This works fine.  However, when I make a selection that does not include this type (Such as "Business, Credit, Apartment"), the count does not change; it still shows the count of calls that have a type of Residential.

I tried changing to use the current selections as the base, but the number does not change:

SUM({$<$(=vDateAlias)={">=$(=vRangeDate1)<=$(=vRangeDate2)"}, callType={'Residential'}>}[Call Count])

So, if I have these counts:

Residential = 200

Business = 300

Credit = 400

Apartment = 500

And make no selections, I would expect the above sum to show 200, which it does.  If I make a selection of Apartment, I would expect the number to change to 0.  It stays at 200.

How do I make the set respect both the Residential count, and current selections?

Thanks!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

If i got the requirement right, here is what you need:

SUM({<$(=vDateAlias)={">=$(=vRangeDate1)<=$(=vRangeDate2)"}>} if(callType='Residential',[Call Count]))

View solution in original post

1 Reply
Anonymous
Not applicable
Author

If i got the requirement right, here is what you need:

SUM({<$(=vDateAlias)={">=$(=vRangeDate1)<=$(=vRangeDate2)"}>} if(callType='Residential',[Call Count]))