Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm having a chart in attached qlikview file. I want to sort x-axis values as follows
OOC,
1 month,
2 to 3 months
4 to 6 months
>12 months.
I think I have to write some condition under sort tab but I'm not getting which condition to write there.
I tried with sum(bucket), count(bucket). But they are not giving required result. So please help me sort x-axis in the way I have explained above.
Thanks a lot!!!
Hi,
I used the dual function in your calculated dimension to get the solution.
See attached example.
Hi
use match function as an expression in the sort tab of the chart properties
match(Month, '4 to 6 months','2 to 3 months','1 to 2 months','1 Month')
Thanks and Regards
Padma
Hi Padma,
Thanks for the reply.
What is Month in above expression??
In my case I'm having "bucket" column using which following text values are assigned. And then that is used as dimension in chart.
OOC,
1 month,
2 to 3 months
4 to 6 months
>12 months.
Go in sort tab and take a look
In this case 'month' is not a dimension. The buckets are calculated dimensions that the OP created
Hi Alexandros17
Thanks for the reply.
I my case I think I have to work with BUCKET column values instead of its sum. Because the order in which the values need to be displayed is as below and it remains the same irrespective of whatever is sum(BUCKET) value.
OOC,
1 month,
2 to 3 months
4 to 6 months
>12 months.
Hi,
I used the dual function in your calculated dimension to get the solution.
See attached example.
I feel instead of creating calculated dimension it's better to create an another field in the script itself. So that you can create an order by defining the order in another flag filed or you can use load order to sort.
Hi Kavita
Month is whatever dimension or expression you would like to sort
Thanks and regards
Padma
Hi
See attached. Used duals in the calculated dimension
=
if(BUCKET<0, Dual('OOC', 0),
if(BUCKET=1, Dual('1 month', 1),
if(BUCKET=2 or BUCKET=3, Dual('2 to 3 months', 2),
if(BUCKET=4 or BUCKET=5 or BUCKET=6, Dual('4 to 6 months', 4),
if(BUCKET=7 or BUCKET=8 or BUCKET=9 or BUCKET=10 or BUCKET=11 or BUCKET=12, Dual('7 to 12 months', 7),
Dual('>12 months', 12)
)))))
HTH
Jonathan