Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
chaudharybilal
Partner - Contributor III
Partner - Contributor III

Partition By in Measure Expression / And Filter Operation within an Attribute

Hi,

We have a unique requirement, following is an example table

Subscriber, Persona

1,Foodie

1,Fashion Savvy

1,Traveler

2,Foodie

2,Sociable

2,Sports Enthusiast.

We have other tables as well and the only measure we use is Count(Distinct Subscribers).

The requirement is that when user selects two persona, only subscribers belonging to both of these personas should be considered. i.e. if the user selects Persona = 'Foodie' & 'Traveler' then from the above example only subscriber '1' should be considered in Count(Distinct Subscribers) rather than both 1 & 2.

Currently what happens is that both 1 & 2 will be considered because both of them have Foodie. But only one have Traveler. 

The number of selections can be upto 100 so we can't have them in different columns. It has to be in the same column.

 

What I need is something like this

if  Total Count(Distinct Persona) = Count(Distinct Persona) over (partition by Subscriber)

then Subscriber

else null().

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

May be this

Count(DISTINCT {<Subscriber = {"=Count(DISTINCT Persona) = GetSelectedCount(Persona)"}>} Subscriber)

View solution in original post

3 Replies
thomaslg_wq
Creator III
Creator III

Hi !

Maybe count(distinct {<Persona={"=Count(distinct Subscriber)=$(=count(distinct Subscriber))"}>} Persona)

sunny_talwar

May be this

Count(DISTINCT {<Subscriber = {"=Count(DISTINCT Persona) = GetSelectedCount(Persona)"}>} Subscriber)

chaudharybilal
Partner - Contributor III
Partner - Contributor III
Author

It worked. Thanks 🙂