Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ?
DT | User | QnID | Col3 |
1/20/2015 | 1 | 1 | Yes |
1/20/2015 | 1 | 2 | No |
1/20/2015 | 2 | 1 | Yes |
1/20/2015 | 2 | 2 | Yes |
1/20/2015 | 3 | 1 | Yes |
1/20/2015 | 3 | 2 | No |
1/20/2015 | 4 | 1 | Yes |
1/20/2015 | 4 | 2 | Yes |
1/20/2015 | 5 | 1 | Yes |
1/20/2015 | 5 | 2 | No |
Yes for both questions, no of users:
=Count(DISTINCT{<User={"=Count(Distinct {<Col3={Yes}>}QnID)=2"}>}User)
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.
See below based on already shared expressions by others...