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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Need help getting to % on filtered data

I think there is a simple answer to what I'm trying to do, but I've been looking at it too long and can't see the forest through the trees now.  Given a table of survey responses, using the CARD visualization, I simply want to display the % of satisfied survey responses.  I have played with measures, but I couldn't get it to work in concert with the slicers (assuming because the measures I tried used Calculate with a filter which I think bypasses the slicers). 

 

I have attached a test pbix file here to illustrate what I'm trying to do:  Test.pbix

 

 

 

Thank you!

 

Dan

2 ACCEPTED SOLUTIONS
knotpc
Advocate I
Advocate I

I would solve by creating TWO new columns in your table. 

 

Dissatisfied = IF(SurveyResponses[Satisfaction]="Dissatisfied",1,0)
Satisfied = IF(SurveyResponses[Satisfaction]="Satisfied",1,0)
 
I would then create these measures
 
Total Dissatisified = SUM(SurveyResponses[Dissatisfied])
Total Satisfied = SUM(SurveyResponses[Satisfied])
Total Survey = [Total Satisfied]+[Total Dissatisified]
%Satisfied = [Total Satisfied]/[Total Survey] "You need to format this as a percentage"
 
After you do all of the above then drag the %Satisified measure into the Values field for your card. 
 
That would be my approach, your mileage may vary. 
 
 

 

View solution in original post

tarunsingla
Solution Sage
Solution Sage

Hi Dan,

 

Try this measure.

 

% of Satisfied Responses =
var satisfiedResponses = CALCULATE(COUNT(SurveyResponses[Satisfaction]), LOWER(SurveyResponses[Satisfaction]) = "satisfied")
var totalResponses = CALCULATE(COUNT(SurveyResponses[Satisfaction]))
RETURN IF(ISBLANK(satisfiedResponses), 0, CALCULATE(DIVIDE(satisfiedResponses, totalResponses,0)))
 
And with this field selected, go to Modeling tab, change the Formatting to %; set the decimal places per your need.
 
SampleMeasure.png
 
Regards,
Tarun

Did I answer your question? Mark my post as a solution!

View solution in original post

4 REPLIES 4
tarunsingla
Solution Sage
Solution Sage

Hi Dan,

 

Try this measure.

 

% of Satisfied Responses =
var satisfiedResponses = CALCULATE(COUNT(SurveyResponses[Satisfaction]), LOWER(SurveyResponses[Satisfaction]) = "satisfied")
var totalResponses = CALCULATE(COUNT(SurveyResponses[Satisfaction]))
RETURN IF(ISBLANK(satisfiedResponses), 0, CALCULATE(DIVIDE(satisfiedResponses, totalResponses,0)))
 
And with this field selected, go to Modeling tab, change the Formatting to %; set the decimal places per your need.
 
SampleMeasure.png
 
Regards,
Tarun

Did I answer your question? Mark my post as a solution!
knotpc
Advocate I
Advocate I

I would solve by creating TWO new columns in your table. 

 

Dissatisfied = IF(SurveyResponses[Satisfaction]="Dissatisfied",1,0)
Satisfied = IF(SurveyResponses[Satisfaction]="Satisfied",1,0)
 
I would then create these measures
 
Total Dissatisified = SUM(SurveyResponses[Dissatisfied])
Total Satisfied = SUM(SurveyResponses[Satisfied])
Total Survey = [Total Satisfied]+[Total Dissatisified]
%Satisfied = [Total Satisfied]/[Total Survey] "You need to format this as a percentage"
 
After you do all of the above then drag the %Satisified measure into the Values field for your card. 
 
That would be my approach, your mileage may vary. 
 
 

 

Anonymous
Not applicable

I tested it and it works great.  Thank you!

Anonymous
Not applicable

Thank you, this was the solution I chose to move forward with, even though the other solution worked too.  Thanks a bunch!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.