Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
stew_scott90
Contributor II
Contributor II

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?

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

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

hth

Sas

View solution in original post

6 Replies
vikramv
Creator III
Creator III

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

Silambarasan1306
Creator III
Creator III

Hi,

  If possible, Share the sample file.

   Then only we can solve your issue.

viveksingh
Creator III
Creator III

Hi,

Can you share a sample one?

stew_scott90
Contributor II
Contributor II
Author

I've attached a sample file.

Anonymous
Not applicable

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
Master III
Master III

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

hth

Sas