Not sure if this is the right place to request as this is about a R visual. However, as the visual is part of the Power BI report I thought I might give it a try. Let me know if this is not the right forum.
I have developed a Power BI report with custom sort of geographic hierarchies. There are 4 levels and I have created the right sort order in the data tables. Using this sort order I have built 2 visuals, a Matrix table and an R bar chart. I used the R chart as I needed error bars and it is not available in other visuals. I am very new to R, searched the internet and I was able to build the bar chart with error bars.
My issue is the matrix table is working with the custom sort that I have built and is in the right order. However the R visual is in alphabetical order. I have searched the internet and was able to find code that will allow manual sorting of the items but this will work only if it is static. My chart is meant to be dynamic and the geography items change when I apply the filter.
Is it possible to get the R visual to follow the custom sort order that I have built. If you can help me that will be greatly appreciated.
Please see the screenshot below for more detail and here is my R code for your reference/review
If the above posts help, please kindly mark it as a answer to help others find it more quickly. thanks!
If not, please kindly elaborate more.
Hi @amitchandak - Thanks for the answer. However, when I clicked on the ellipse button there was no sort option available like you get in other visuals. Please see the screenshot below
Sorry if I interpreted your answer incorrectly.
By the way, you don't need unique() - Power BI already does that for your dataframe as mentioned in the comments of the R visual.
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!
Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.