Forum Discussion
edzkulasa
4 years agoNew Member
Survey Responses
Hello All
I am trying to create a Card Visualization that will only shows the percentage of 'Happy & Neutral' responses out of total survey questions responses.
The table data as shows below and I want to know what measurement I should use or alternative method should I use. I hope someone can help?
| Request ID | Survey Question | Rating |
| 12496 | How was your experience? | Unhappy |
| 12496 | How happy are you with support? | Unhappy |
| 2649 | How was your experience? | Happy |
| 2649 | How happy are you with support? | Happy |
| 3102 | How was your experience? | Happy |
| 3102 | How happy are you with support? | Neutral |
| 5380 | How was your experience? | Happy |
| 5380 | How happy are you with support? | Happy |
| 5455 | How was your experience? | Happy |
| 5455 | How happy are you with support? | Happy |
| 5410 | How was your experience? | Happy |
| 5410 | How happy are you with support? | Neutral |
| 4843 | How was your experience? | Happy |
| 4843 | How happy are you with support? | Happy |
| 7350 | How was your experience? | Happy |
| 7350 | How happy are you with support? | Unhappy |
Happy & Neutral % =
var totalResponses = COUNTROWS( 'Responses' )
var happyNeutralResponses = CALCULATE( COUNTROWS( 'Responses' ), TREATAS( { "Happy", "Neutral" }, 'Responses'[Rating] ) )
return DIVIDE( happyNeutralResponses, totalResponses )
2 Replies
- johnt75
Super User
Happy & Neutral % =
var totalResponses = COUNTROWS( 'Responses' )
var happyNeutralResponses = CALCULATE( COUNTROWS( 'Responses' ), TREATAS( { "Happy", "Neutral" }, 'Responses'[Rating] ) )
return DIVIDE( happyNeutralResponses, totalResponses )