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: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Intersection of data

Hi All,

Have below data. I need to plot table showing how many users answered Yes for both the questions, # of users Yes for QnID 1 & QnID 2. How can we \achieve this ?

DTUserQnIDCol3
1/20/201511Yes
1/20/201512No
1/20/201521Yes
1/20/201522Yes
1/20/201531Yes
1/20/201532No
1/20/201541Yes
1/20/201542Yes
1/20/201551Yes
1/20/201552No
3 Replies
tresesco
MVP
MVP

Yes for both questions, no of users:

=Count(DISTINCT{<User={"=Count(Distinct {<Col3={Yes}>}QnID)=2"}>}User)

petter
Partner - Champion III
Partner - Champion III

In a chart where you include the User as a dimension and each user has only one row you can use this

expression:

-(Count({<Col3={'Yes'}>} User )=2)

This will return a true or false value ( -1 or 0 ) and the zero values will be eliminated as default. The minus one will be converted to a 1 indicating that you have a match.

If( Count({<Col3={'Yes'}>} User)=2 , 'Both Yes' )

Will also do the trick but with a more sensible return value.

Digvijay_Singh

See below based on already shared expressions by others...