Forum Discussion
User input for each row
- 1 year ago
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
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
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-achippa1 year agoCommunity 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
- Jessica_171 year agoHelper V
HI v-achippa
Is there any workaorund for it, to make it possible?
- v-achippa1 year agoCommunity Support
Hi Jessica_17,
Yes, we can choose a sort option from a slicer and use DAX to apply sorting dynamically in visuals
- Create a table with sort options. And then add it as a slicer in the report.
- Create a measure for example like below to dynamically assign sort values based on the selected sort option:
DynamicSort =
SWITCH(
SELECTEDVALUE('SortOptions'[SortOptionID]),
1, MAX('YourTable'[SortOrder]),
2, RANKX(ALL('YourTable'), 'YourTable'[Category],, ASC),
3, RANKX(ALL('YourTable'), CALCULATE(SUM('YourTable'[Price])),, DESC)
)
Use this logic to control sorting in the visuals.
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