Forum Discussion
sorting issue
- 1 year ago
Hi raju8004212 -yes, this is a known limitation with Power BI. Power BI cannot sort by a measure across all legend categories. If you want to still use the legend (e.g. Order Year), then create a ranking measure per customer based on total or max sales, and use that to sort your Y-axis (Customer Name).
create as like
Customer Rank =
RANKX(
ALL('Orders'[Customer Name]),
CALCULATE(MAX('Orders'[Sales]))
)Then go to your Customer Name column, and in the Modeling tab, set "Sort by Column" = [Customer Rank].
Now your Y-axis (Customer Name) will sort according to max sales despite the legend.
solved reference links:
Stacked bar chart won't sort properly with value i... - Microsoft Fabric Community
Hope this helps.
Hi raju8004212 -yes, this is a known limitation with Power BI. Power BI cannot sort by a measure across all legend categories. If you want to still use the legend (e.g. Order Year), then create a ranking measure per customer based on total or max sales, and use that to sort your Y-axis (Customer Name).
create as like
Customer Rank =
RANKX(
ALL('Orders'[Customer Name]),
CALCULATE(MAX('Orders'[Sales]))
)
Then go to your Customer Name column, and in the Modeling tab, set "Sort by Column" = [Customer Rank].
Now your Y-axis (Customer Name) will sort according to max sales despite the legend.
solved reference links:
Stacked bar chart won't sort properly with value i... - Microsoft Fabric Community
Hope this helps.