I have the following chart in PowerBI
I would like to put the legend order exactly like the lines order (the line at the bottom receives the first legend, and so on). Any way to do that?
In the transformation layer, add a new custom column "sort_order" with this similar code-
if [Item No] = "ITEM-A" then 2 else if [Item No] = "ITEM-B" then 1 else 3
Here is the output in my table-
Now in the table visual see how the Item No ordered with default setup when I add the column with an aggregated value. This is basically following the default Asscending order-
Now, to change the order of Item No, we need to order the column based on another (sort_order) column as shown below in the Table View window.
And here is the new custom order for column Item No-