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.
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:
Solved! Go to Solution.
@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" )
@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" )
I am getting an error that says, "Too few arguments were passed to DIVIDEW function. Minimum argument count for the fuction is 2.
@Anonymous
Well the formula needed more brackets.. try this one:
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")) )
Now I am getting "operator or expression '()" is not supported in this context.
@Anonymous
Can you share the workspace with us if possible?
I know the matric is correct, but I cannot get my column chart percentages to match the matrix.
@Anonymous
also try removing this bit from the formulas used in graph
, ALLEXCEPT(Satisfaction_Survey,Satisfaction_Survey[SurveyYear])
@Anonymous
How the matrix differs from the chart?
Do you use different dimensions or measures?
In the Matrix, I use Count of Time (Time is considered Text data), and then %Count of Time (percent by column total) by year and Time (Strongly Agree - Strongly Disagree). When I use Time as a value in the Chart, it calculates the percentage of the Grand Total, and not by year, so I created the measure #of Respondents to calculate percentage of each response by year, but for some reason, it is including responses BLANK and NA - Not Applicable where I can easily filter those out in the matrix.
@Anonymous
From your last message it is not clear where the problem is. I got a bit confused.
I thought you had issues with the 100%s on the chart??
My apologies! I took a few steps back to respond to your question about how the matrix differs from the chart and if I use differnt dimensions or measures. I don't get 100% columns with my original measure:
#ofRespondentsT = DIVIDE(COUNTA(Satisfaction_Survey[Q1]), CALCULATE(COUNTA(Satisfaction_Survey[Q1]), ALLEXCEPT(Satisfaction_Survey,Satisfaction_Survey[SurveyYear])))
When I include BLANK and NA - Not Applicable responses in my matrix, the percentages equal the chart percentages, so for some reason, I am able to easily filter out these responses in the matrix, but they will not filter in the chart.
I cannot share the workspace due to the sensitivity of the data 😞
I tried the formula above, and I am not receiving any errors now, but each bar graph is coming back as 100% (I changed the format of the measure to be %).
Time = Q1
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |