Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
stew_scott90
Not applicable

QlikSense Sorting Issue

Hi,

I have a combo chart where I have added the QTR (quarter) as an alternative dimension. I also have a filter for QTR as well.

Both have been set to sort numerically and ascending.

Today I noticed the bars go Q12016 - Q22016 - Q42016 - Q32016. I created a new app using the same data source and had the same issue.


Any ideas what would cause this to happen?

Tags (1)
1 Solution

Accepted Solutions
sasiparupudi1
Not applicable

Re: QlikSense Sorting Issue

Change the sorting for QTR to expression   Date(Aggr(Max([Close Date]),QTR),'YYYY-MM')

hth

Sas

6 Replies
vikkyv
Not applicable

Re: QlikSense Sorting Issue

May be it is considering the whole string while sorting.

Try to use custom sort on Quarter dimension as "=Num#(Mid(QTR,2,1))" and sort by Ascending.

Thanks.

Vikram

silambarasan130
Not applicable

Re: QlikSense Sorting Issue

Hi,

  If possible, Share the sample file.

   Then only we can solve your issue.

viveksingh
Not applicable

Re: QlikSense Sorting Issue

Hi,

Can you share a sample one?

stew_scott90
Not applicable

Re: QlikSense Sorting Issue

I've attached a sample file.

businessajit2
Not applicable

Re: QlikSense Sorting Issue

Hi Stewart,

I could not make much impact by changing any sorting properties in your app, so I used two different approaches. Depending on how difficult it is for you to do it, try either of them.

first approach - I exported the chart and reloaded the data and it worked perfectly well. Assuming it is possible for you to do that, try it. Make sure that the Q42016 is actually listed after the Q32016 in the order.

Second approach - this I normally use when either such kind of sorting anomalies are present or the sorting has to be forced customized to certain specific order. I use a if/wildmatch condition to assign numbers to the QTR dimension and then in the properties, do the sorting using this expression. This is what I have used for your example -

if(WildMatch(QTR, 'Q12016'),'1',

if(WildMatch(QTR, 'Q22016'),'2',

if(WildMatch(QTR, 'Q32016'),'3',

if(WildMatch(QTR, 'Q42016'),'4',

if(WildMatch(QTR, 'Q12017'),'5',

if(WildMatch(QTR, 'Q22017'),'6',

))))))

both of these approaches worked and produces the chart with Q42016 in the correct order as seen below -

qtr2.JPG

let me know if this works for you.

thanks,

Ajit

sasiparupudi1
Not applicable

Re: QlikSense Sorting Issue

Change the sorting for QTR to expression   Date(Aggr(Max([Close Date]),QTR),'YYYY-MM')

hth

Sas