Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
edzkulasa
New 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 IDSurvey QuestionRating
12496How was your experience?Unhappy
12496How happy are you with support?Unhappy
2649How was your experience?Happy
2649How happy are you with support?Happy
3102How was your experience?Happy
3102How happy are you with support?Neutral
5380How was your experience?Happy
5380How happy are you with support?Happy
5455How was your experience?Happy
5455How happy are you with support?Happy
5410How was your experience?Happy
5410How happy are you with support?Neutral
4843How was your experience?Happy
4843How happy are you with support?Happy
7350How was your experience?Happy
7350How happy are you with support?Unhappy
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Happy & Neutral % =
var totalResponses = COUNTROWS( 'Responses' )
var happyNeutralResponses = CALCULATE( COUNTROWS( 'Responses' ), TREATAS( { "Happy", "Neutral" }, 'Responses'[Rating] ) )
return DIVIDE( happyNeutralResponses, totalResponses )

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Happy & Neutral % =
var totalResponses = COUNTROWS( 'Responses' )
var happyNeutralResponses = CALCULATE( COUNTROWS( 'Responses' ), TREATAS( { "Happy", "Neutral" }, 'Responses'[Rating] ) )
return DIVIDE( happyNeutralResponses, totalResponses )

Thanks @johnt75 . It works 😉

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.