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
Anonymous
Not applicable

Display Percentage of Each Response per Question Across Year

I am trying to create a column chart to show the percentage of each response option across each year. For example, for question 1, I want to know the percentage of people who responded agree vs disagree for 2015, 2016, 2017, and 2018. I have Q1 as the axis and SurveyYear as the Legend. When I use Q1 as the value, it gives me the percentage of each response grand total and not yearly total. To fix this, I created a new measure for the value: 

 

#ofRespondentsT = DIVIDE(COUNTA(Satisfaction_Survey[Q1]), CALCULATE(COUNTA(Satisfaction_Survey[Q1]), ALLEXCEPT(Satisfaction_Survey,Satisfaction_Survey[SurveyYear])))
 
My issue is that I want to omit anyone who didn't respond to that question (BLANK), AND those who responded NA-Not Applicable, but my current measure is including those in the formula. How do I edit my measure so both BLANK and NA-Not Applicable are omitted? I have attached a photo of my sample data. 
 
Goal: Determine the percentage of each response option by year for Q1 omitting NA and BLANK from total responses.
 
example data.jpg
 
1 ACCEPTED SOLUTION
themistoklis
Community Champion
Community Champion

@Anonymous

 

Try the following:

 

DIVIDE(CALCULATE(COUNTA(Satisfaction_Survey[Time]), Satisfaction_Survey[Q1] <> BLANK(), Satisfaction_Survey[Q1] <> "NA-Not Applicable"

, CALCULATE(COUNTA(Satisfaction_Survey[Time])

, ALLEXCEPT(Satisfaction_Survey,Satisfaction_Survey[SurveyYear]))

, Satisfaction_Survey[Q1] <> BLANK(), Satisfaction_Survey[Q1] <> "NA-Not Applicable"

)

 

View solution in original post

13 REPLIES 13

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.