Forum Discussion
Dynamic Sorting stacked bar chart based on slicer value
Thank you ValtteriN for your answer but
I am sorry to not mention one thing I need to sort the legend, not the axis based on the slicer.
- ValtteriN3 years agoCommunity Champion
Hi,
If you want to have a dynamic legend. Then the easiest way is to use field parameters:
1. Create a new field parameter:(enable this in preview features)
2. Place the desired olumns:3. Now palce the parameter in legend:
Selecting values from parameter slicer will change the legend
- rashesh3 years agoFrequent Visitor
Thank you so much for your great effort ValtteriN But let me clear my requirement again.
You can see my table and visual that is given below.
here I selected the 1 so my legends are short according to the alphabetic order same as 2 or 3 but instead of these three when 4 is selected from the slicer this my stocked bar chart legend must sort according to the value(sum of X_Axis) column.
DataVisualHope it clears you
Thank you
ValtteriN
@amitchandak- Anonymous3 years agoNot applicable
Hi rashesh ,
I create a sample to have a test, I think Power BI doesn't support us to sort the bar chart by value in each legend.
our demand is a good idea, while it is not supported to implement in Power BI currently.
You can vote up this idea for this function:Microsoft Idea (powerbi.com)
Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.