Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I'm using a 100% Stacked chart and the legend is either Y or N. I have the N coming up at the bottom of the bar and Y from the top. Is there any way I can switch those two around so that Y starts at the bottom?
Thank you,
DHB
Solved! Go to Solution.
There sure is. Just add a new column to your table that will control the sort order of your Legend column
So please add the following column
Legend Sort = IF('mytable'[Legendcol] = 'Y' , 0 , 1 )
Then specify the sort order of your existing column to use this new column using the Sort By Column feature
There sure is. Just add a new column to your table that will control the sort order of your Legend column
So please add the following column
Legend Sort = IF('mytable'[Legendcol] = 'Y' , 0 , 1 )
Then specify the sort order of your existing column to use this new column using the Sort By Column feature
That's great thanks Phil.
The issue I have now is that I can't sort another column in the same table. It says Sort By Another Column Error - This column can't be sorted by a column that is already sorted, directly or indirectly , by this column. Can I only do this once per table?
Oh ok, it looks like you can't then. I haven't come across that. I take it you have another Y/N column in your table?
Perhaps just create some more sorting columns (which you can hide)
Yes, I have two Y/N columns in the same table. Thank you for your trick for sorting one column, I'll definitely be able to use that elsewhere.
Hi @DHB,
As @Phil_Seamark suggested create another SortBy Column for your additional column.
You can most definitely then use your additional SortBy column on your additional column.
I've got it now. I'd been creating sorting columns that referenced the column I wanted to sort. All working perfectly.
Thanks so much for your help.
DHB
Hi @GilbertQ,
I tried sorting the two columns with seperate SortBy columns but PBI wasn't happy with it. I'll give it another try tomorrow.
Thanks,
DHB
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 39 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 32 | |
| 27 | |
| 25 |