Forum Discussion
Adding Legend to Stacked Bar graph distorting the %s
- 10 months ago
Hi F_Reh,
Thankyou for the followup.
The expression SELECTEDVALUE(Parameter_HI[ParameterLabel], "Organisation Action/Client Action #") uses the string default so the measure has a predictable fallback when the slicer is empty or multi-selected. In the PBIX file, Parameter_HI is a disconnected table created using Enter Data, not the built-in Field Parameter. The disconnected approach is straightforward and works with the SWITCH wrapper to map the slicer label to the appropriate # or % measure.
Additionally, please find attached a screenshot and a revised sample PBIX file that uses the Field Parameters feature, which may assist in resolving the matter:
We hope the information provided will help resolve the issue. Should you have any further queries, please feel free to contact the Microsoft Fabric community.Thank you.
Sorry, if I am not mistaken but in previous post I can't see references to any Columns/Measures (other than the one passed on to the REMOVEFILTERS function) so I haven't tried that one as of yet.
Anyway, I looked at the earlier recommended solutions and tried this:
Organisation Action/Client Action %" = CALCULATE( DIVIDE(SUM(<Table>[Numerator],<Table>[Total/Denominator]),REMOVEFILTERS(<Table> [Age_Band]))
However, it still produces relatively huge %s for each segment:
But when I remove the Age field from the Legend, the Total Monthly %s (for all Age bands) become exactly right (checking over with manual calculation)