Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a bar chart with 6 categories, e.g. Prohibited, Restricted, High, Very High, Moderate, Low. In my load script I created a order column for the sorting of the bars in the chart which goes something like:
if(COL = 'prohibited', 1,
if(COL = 'restricted', 2,
if(COL = 'very high', 3,
if(COL = 'high', 4,
if(COL = 'moderate', 5,
if(COL = 'low', 6, 2)))))) AS COL_SORT
I also have the "Show All Values Option" checked which shows the categories with 0 counts. What I find is that sorting only partially works in that if I have volume in each category the order works but if there are 0 bars there are no guarantees the sort works.
My question is: Is there a way to guarantee the order of the bars no matter whether is the bar count is 0 or more?
Kind Regards,
Lorcan
How are you using COL_SORT? As in expression on the sort tab? Try to use this
Only({1} COL_SORT)
Can you share a sample to look into?
don't suppress null or zero values. it should work
regards
Pradosh
How are you using COL_SORT? As in expression on the sort tab? Try to use this
Only({1} COL_SORT)
Hi Lorcan,
Could you please use load inline dual function for the custom sorting.
load dual(String,Numrep) as COL_SORT inline
[String, Numrep
prohibited, 1,
restricted, 2,
very high, 3,
high, 4,
moderate', 5,
low, 6];
In chart properties under sort tab please give numerical ascending.