Forum Discussion
Survey analysis: selection/filtering respondents based on responses
- Anonymous2 years ago
Thanks for the reply from ray_aramburo , please allow me to provide another insight:
Hi, Anonymous
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.Then I created a calculation table like this, and used it as a slicer:
select111 = SELECTCOLUMNS('Table','Table'[question],'Table'[response])3. Below are the measure I've created for your needs:
MEASURE = VAR response1 = SELECTEDVALUE ( 'select111'[Table_response] ) VAR ques1 = SELECTEDVALUE ( 'select111'[Table_question] ) VAR ID1 = CALCULATETABLE ( VALUES ( 'Table'[ID] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[question] = ques1 && 'Table'[response] = response1 ) ) RETURN IF ( ISFILTERED ( select111 ), CALCULATE ( COUNT ( 'Table'[response] ), FILTER ( 'Table', 'Table'[ID] IN ID1 ) ), COUNT ( 'Table'[response] ) )4.Then replace the counting measure for responses with the measure:
5.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi there,
Yes, I have tried a couple of slicer combinations, the most logical one being:
Unfortunately, using this slicer, and clicking on one answer, it limits the visual to just the one answer to that question:
If I reverse the hierarchy in the slicer, I get all "agree" responses to a particular question. But I'm looking for the group of respondents who answered (for example) "Agree" to question 3, and I want to see how those respondents replied to all other questions. Much like a "(all) customers who bought X also bought Y" kind of comparison
- Anonymous2 years agoNot applicable
Thanks for the reply from ray_aramburo , please allow me to provide another insight:
Hi, Anonymous
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.Then I created a calculation table like this, and used it as a slicer:
select111 = SELECTCOLUMNS('Table','Table'[question],'Table'[response])3. Below are the measure I've created for your needs:
MEASURE = VAR response1 = SELECTEDVALUE ( 'select111'[Table_response] ) VAR ques1 = SELECTEDVALUE ( 'select111'[Table_question] ) VAR ID1 = CALCULATETABLE ( VALUES ( 'Table'[ID] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[question] = ques1 && 'Table'[response] = response1 ) ) RETURN IF ( ISFILTERED ( select111 ), CALCULATE ( COUNT ( 'Table'[response] ), FILTER ( 'Table', 'Table'[ID] IN ID1 ) ), COUNT ( 'Table'[response] ) )4.Then replace the counting measure for responses with the measure:
5.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.