Forum Discussion
Custom Sort by x-axis legend
How can I add a custom Sort in a line chart with the legend
| 1W | 1M | 2M | 3M | 6M | 1Y | 2Y |
and so on...
I tried to add a sort column and used "Modeling", "Sort by Column" but it doesn't work. Does anyone have an idea how to solve the problem? Many thanks.
- Anonymous9 years ago
Hi mw,
In your scenario, please create a new table to sort CHF Swap Rates with desired order as follows, then merge this new query to you original query and retain the order column.
After that, please click the CHF Swap Rates column in the Field Pane, then select the order column after clicking “Sort By Column” under Modeling ribbon. This way, you are able to achieve your requirement. For more details, you can review the example in the attached PBIX file.
Thanks,
Lydia Zhang
6 Replies
- AnonymousNot applicable
Hi mw,
Could you please describe more details about your scenario? We need to know which field you put in legend and the exact error message you get when using “Sort by Column” option. In addition, if you want to sort the column ‘Perzentil’ by ‘SortBy’, you need to make sure that the values in the Perzentil column map m:1 with the SortBy column.
Thanks,
Lydia Zhang- mwRegular Visitor
Thank you Lydia
The Chart looks now like that:
I'd like to have several curvers for the percentiles for the several CHF Swap Rates (x-axis). That is fine so far. But the Legend of the x-axis should ordered by the duration (1W = 1Week, 1M = 1 Month, 2M = 2 Month....1Y = 1 Year...up to 30 Y).
For this purpose I tried to add a column "SortBy" and used "Modeling", "Sort by Column". I didn't get an error Message but it didn't work as you can see on the picture of the chart.
Thanks Martin
- AnonymousNot applicable
Hi mw,
In your scenario, please create a new table to sort CHF Swap Rates with desired order as follows, then merge this new query to you original query and retain the order column.
After that, please click the CHF Swap Rates column in the Field Pane, then select the order column after clicking “Sort By Column” under Modeling ribbon. This way, you are able to achieve your requirement. For more details, you can review the example in the attached PBIX file.
Thanks,
Lydia Zhang