The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello all,
Here is my multiples graph with the correct data labels.
I want to show these labels as a percent of grand total for each year.
When I change the labels to "Percent of Grand Total", this is what I get:
These %'s are incorrect. BI is summing both years together and then doing the math.
In reality, I need each year summed seperately.
For instance, the total of 2023 is 524. The number of people who selected "Extremely satisfied" was 215 so the % above that answer should be 41% (not 21%). The number of people who selected "Not at all satisfied" was 132 so the % for that should be 25%, so on and so forth.
I've created this measure to go on the y-axis.:
When I replace the y-axis, this is what I get:
It's still wrong.
How do I get BI to calculate and show the correct %'s?
I can't attach the BI file because I'm not a SuperUser.
Solved! Go to Solution.
Hi @e175429 ,
Thanks for reaching out.
Here's my workaround. Please try:
Response year for y-axis =
VAR _1 =
CALCULATE (
COUNT ( 'Table'[1. Overall, how satisfied were you with your response?] ),
FILTER (
ALLSELECTED ( 'Table' ),
[Year] = MAX ( 'Table'[Year] )
&& [1. Overall, how satisfied were you with your response?]
= MAX ( 'Table'[1. Overall, how satisfied were you with your response?] )
)
)
VAR _2 =
CALCULATE (
COUNT ( 'Table'[1. Overall, how satisfied were you with your response?] ),
FILTER ( ALLSELECTED ( 'Table' ), [Year] = MAX ( 'Table'[Year] ) )
)
RETURN
DIVIDE ( _1, _2 )
_1 is grouped by year and type of vote, and _2 is the total number of votes grouped by year.
The result is above, you can download my attachment for more details.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @e175429 ,
Thanks for reaching out.
Here's my workaround. Please try:
Response year for y-axis =
VAR _1 =
CALCULATE (
COUNT ( 'Table'[1. Overall, how satisfied were you with your response?] ),
FILTER (
ALLSELECTED ( 'Table' ),
[Year] = MAX ( 'Table'[Year] )
&& [1. Overall, how satisfied were you with your response?]
= MAX ( 'Table'[1. Overall, how satisfied were you with your response?] )
)
)
VAR _2 =
CALCULATE (
COUNT ( 'Table'[1. Overall, how satisfied were you with your response?] ),
FILTER ( ALLSELECTED ( 'Table' ), [Year] = MAX ( 'Table'[Year] ) )
)
RETURN
DIVIDE ( _1, _2 )
_1 is grouped by year and type of vote, and _2 is the total number of votes grouped by year.
The result is above, you can download my attachment for more details.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you for a solution.
How would you go about putting the x-axis in order from "Not at all" to "Extremely Satisfied"?
User | Count |
---|---|
20 | |
8 | |
7 | |
7 | |
6 |
User | Count |
---|---|
28 | |
12 | |
11 | |
9 | |
8 |