Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi, I am working with some survey data (apologies, it's sensisitve so cannot share examples)
I have this matrix, which shows the row total by category and the grant total on the bottom row.
I want to present this as a visual for the user, I've therefore used a 100% stacked column chart however I am now unable to compare the category % to the grant total.
The idea is that I want to be able to easy see whether a category has a higher or lower % compared to the overal data.
Help appreciated!
Solved! Go to Solution.
Hi @Aimeeclaird ,
To what I can understand you want to have a total column in the stacked column visualization I made a similar answer today you need to do the folllowing:
Axis_values = union(DISTINCT('Table'[AxisCategory]); {"Total"})
Now create the following measure:
Stacked =
SWITCH (
SELECTEDVALUE ( 'Axis_values'[AxisCategory] );
"Total";
CALCULATE (
SUM ( 'Table'[value] );
FILTER (
'Table';
'Table'[LegendCategory] = SELECTEDVALUE ( 'Table'[LegendCategory] )
)
);
CALCULATE (
SUM ( 'Table'[value] );
FILTER (
'Table';
'Table'[AxisCategory] = SELECTEDVALUE ( 'Axis_values'[AxisCategory] )
)
)
)
Result below and in attach PBIX file.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Aimeeclaird ,
To what I can understand you want to have a total column in the stacked column visualization I made a similar answer today you need to do the folllowing:
Axis_values = union(DISTINCT('Table'[AxisCategory]); {"Total"})
Now create the following measure:
Stacked =
SWITCH (
SELECTEDVALUE ( 'Axis_values'[AxisCategory] );
"Total";
CALCULATE (
SUM ( 'Table'[value] );
FILTER (
'Table';
'Table'[LegendCategory] = SELECTEDVALUE ( 'Table'[LegendCategory] )
)
);
CALCULATE (
SUM ( 'Table'[value] );
FILTER (
'Table';
'Table'[AxisCategory] = SELECTEDVALUE ( 'Axis_values'[AxisCategory] )
)
)
)
Result below and in attach PBIX file.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsUser | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |