Sort order for legend not working

Hi,

 

I'm trying to sort a legend on multiple charts by High > Medium > Low and I'm using the formula below, then sticking it in the sort field, but its not sorting by it.  It looks to be sorting by the count of item in each of these categories.  What am I doing wrong?

 

(CASE
WHEN `EB Project Risk`='High' THEN 1
WHEN `EB Project Risk`='Medium' THEN 2
WHEN `EB Project Risk`='Low' THEN 3
END)

Best Answer

  • RGranada
    RGranada 🟢
    Accepted Answer

    Ok,

     

    So, I think this should be what you need:

     

    2017-10-17_150746.png

     

    Use your last version where you can set the sorting aggregation to "no aggregation"  and set the General/Unsorted Data to True in Chart Properties.

     

    Let me know how it goes!

     

Answers

  • Hi,

     

    Do you have any aggregation set in the sort field?

     

    It should be set to no aggregation:

     

    2017-10-16_174734.png

     

    Hope this helps.

  • I do not.  I don't even have an option for it. 

  • Do you have any aggregation on your `EB Project Risk` field?

     

    Regards,

  • Its a pie chart and I'm counting the number of items in each category.

  • Can you show me a screenshot of your card in the analyzer?

     

    Regards,

  • Can't replicate your problem....

     

    Try to remove your sort field and add it again, and even do that to the rest of the fields. Every scenario I test I end up with the aggregation option on the sort field and the correct results.

     

    Please tell me how it goes.

     

    Regards.

  • So this is interesting.  I did try what you said and it did not work.  I even tried creating a brand new card with the same data and it did not work.  However what I did notice is that I was given a field for aggregation in the sort menu now.  I did make sure it was set to no aggregation but still not having any luck.

  • That is strange indeed!

     

    If you want to send me a sample of your data I will have a look and see how it does on my platform...

     

    Regards,

  • I had to pull some data out of it for security reasons but it wasn't necessary for this chart.  The only field I'm looking at is EB Project Risk and I'm using Count as the aggregation for the chart.  I'm not using aggregation on the sort.  Thanks for helping me out with this!

  • I cannot believe how simple that was. Thank you so much! I really appreciate all the time you put into looking at this.

  • No problem... I also overlook that.

     

    Best Regards.