Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Tuzlukov
Contributor
Contributor

Ignore one selection in Set Analysis

Hi!

I have this set analysis in my expression:

Count({<[Contact IsActive] = {'true'}, [Contact SpecialtyName] = {'n1','n2'}>} DISTINCT [Contact Id])

I want to keep [Contact SpecialtyName]  filter,  but i want to ignore only [Contact IsActive]  filter. Is it possible to do in one set analysis?

If i write '1' before set analysis, it (of course) ignore both of filters. How to keep just one of them?

Count({1<[Contact IsActive] = {'true'}, [Contact SpecialtyName] = {'n1','n2'}>} DISTINCT [Contact Id])

Labels (1)
4 Replies
AdiPai
Creator II
Creator II

What about writing -

Count({<[Contact IsActive] = {'false'}, [Contact SpecialtyName] = {'n1','n2'}>} DISTINCT [Contact Id])

Gysbert_Wassenaar

Your expression as it is now will also ignore user selections in those two fields. It uses fixed selections. Adding a 1 before the set modifiers will not change that. That will simply make it ignore user selections in every field.

If you want to ignore user selections in a field and don't want to replace it with a fixed selection then use something like

Count({<[Contact IsActive] =, [Contact SpecialtyName] = {'n1','n2'}>} DISTINCT [Contact Id])

That will use all possible values in Contact IsActive regardless of user selections in that field.

If you want to keep the user selections then simply remove the set modifier for that field from the expression:

Count({< [Contact SpecialtyName] = {'n1','n2'}>} DISTINCT [Contact Id])


talk is cheap, supply exceeds demand
Tuzlukov
Contributor
Contributor
Author

Ok, maybe i asked wrong question. 

Please see picture below. I have expression "base" calculated by code from my first message.

And i also have dimension "week" which unable to compare with table that contains "base" data. I want to get in all fields "base" with category "A" value 54. Independently to "week":

there is something wrong with photo attachment

Without week dimension my table looks like this:

one more photo

Hope you understand me 🙂

Brett_Bleess
Former Employee
Former Employee

Andrey, check out the following Design Blog post, and there are some other links inside the post as well, be sure to check those too, as I think you may actually need one of the other ones to do what you want, but I hope this may be what you need to help you get things figured out.

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.