Forum Discussion
User input for each row
I have a table with two columns:
Category (Col A)
Price (Col B)
I want to create a stacked bar chart using these columns.
However, the key requirement is that the order of the category legends in the chart should be dynamic — based on a user-defined sorting order.
The user will assign a sorting number for each category, and the chart should update the legend order accordingly.
Can anyone please help me in this?
Hi Jessica_17,
Currently power bi does not support direct user input into data model values from the report UI. The power bi report canvas is read only so the users cannot type or change data values like SortOrder dynamically for each row. So the user can't enter the value in UI itself for each category.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
10 Replies
- rajendraongole1Super User
Hi Jessica_17 - Yes, you can definitely achieve dynamic legend ordering in a stacked bar chart in Power BI.
below are some of the solved reference links:
https://community.powerbi.com/t5/Desktop/Sort-legend-for-stacked-column-chart/td-p/2574412
Hope this helps.
- Jessica_17Helper V
HI rajendraongole1 ,
Thanks for that. However, my main requirement is that the user should be able to manually enter or adjust the sorting order for each row directly within the Power BI UI—without relying on external sources like SharePoint, Excel, or manual dataset updates. Is there any way to make the sorting dynamic and editable by the user within the report itself?
- v-achippaCommunity Support
Hi Jessica_17,
Thank you for reaching out to Microsoft Fabric Community.
Based on the requirement, please follow the below steps:
- Add a SortOrder column to your table like assign a number to each category to define the desired order.
- In power bi, go to Data view, select the Category column --> click on Sort by Column --> choose SortOrder.
- In the stacked bar chart use Category as the Legend. Now the legend will appear in the custom sort order which is defined.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
- Jessica_17Helper V
HI v-achippa ,
Thanks for that. However, my main requirement is that the user should be able to manually enter or adjust the sorting order for each row directly within the Power BI UI—without relying on external sources like SharePoint, Excel, or manual dataset updates. Is there any way to make the sorting dynamic and editable by the user within the report itself?
- v-achippaCommunity Support
Hi Jessica_17,
Currently power bi does not support direct user input into fields like sort order from within the report UI. Users cannot manually change column values like sort order directly inside a visual or dataset in a published report.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa