Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
How to sort the values in the legend in a stacked bar chart in Qlik Sense.
Kind Regards,
Hi,
May be define the sorting of function CLASS() (see attached file).
Regards,
Andrey
Hi Andrey,
Thanks for the response, i tried using Class() but it is not working. Even the legends disappear.
Regards,
Sort by valuelist() ?
Hi Andy ,
Thanks for the response, tried using valuelist(), but its not working!
Thanks & Regards,
Dear kshitijas,
can you share Qvf with your sample data , so that we can help you in better way,
Thanks,
Mukram.
Hi all, has anyone found a resolution or a workaround for the legend sorting issue that works? I am running into the same exact issue. I am also using the Limitation property to get the top 10 dimension values and the sorting between the stacked bar chart and legend is not working or matching.
Best,
MB
Try this in your script
Sorting:
LOAD * INLINE [
SortDaysBucket, DaysBucket
1, 0-30
2, 30-60
3, 60-90
4, >90
];
DaysBucket is your Field in Data which would map automatically.
And use SortDaysBucket in frontend in your Sorting options for BarChart. Adjust it Ascending or Descending as per you required.
This logic won't work in my case as my field (i.e. your DaysBucket) values is dynamic values and will constantly change and cannot be hard coded.