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.
Dear Leroy,
This is amazing. Thank you so much! With a few adjustments to table and column names, I got it to work to my pivotted table and now everything is running smoothly!