Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
infock12
Creator III
Creator III

Sorting in cyclical group - unsolved

Hi all,

I am struggling to make the cyclic group sorting work but not finding any luck.

I have 3 dimensions in a group. MonthName, Specialty and Consultant.

I went into Chart Properties>Sort, unticked everything and choose 'Override Group Sort Order'

I went into Document Settings > Document Properties > Groups > Edit, promoted the MonthName to first in the order.

I went into Sort Orders, chose MonthName and said Match(MonthName, 'Apr-15', 'May-15',etc.)

For Specialty, I chose Expression descending and copied the expression that I used in the chart (This is because I can't see a Y-value descending here).

For consultant, I followed the same above.

The outcome I am getting for Months is it starts with Apr-16 (instead of Apr-15) and goes up to Nov-16, and goes to Jan-16 (skipping Dec-15) and then Mar-16 (skipping Feb-16). The data does exists for those months and it is jumbled, so not sure why.

Any help is appreciated.

Thanks,

karthik

1 Solution

Accepted Solutions
thomaslg_wq
Creator III
Creator III

You may need edit the group => sort order :

Month : numeric value ascending

Others : expressions ==> put the same measure as the one in the chart.

And in the chart, un select every check box in the sort otab.

This workaround should work

View solution in original post

12 Replies
Colin-Albert

If you created the Monthname field using the monthname() function, the field should be sorted numerically as it is a dual field.

Your expression is sorting the field as text hence April is shown first.

What is wrong when the data is sorted using the Default Group Sort Order?

Have a look at this explanation of Dual()  How to use- Dual()

thomaslg_wq
Creator III
Creator III

Hi Karthik,

Could you post an example.qvw with scrambled data to help you ?

You may want to create your [MonthName] field a dual value (text and numeric) and then sort by numeric value.

regards,

Thomas

sunny_talwar

I think you need to uncheck 'Override Group Sort Order' because you want your chart to be sorted by whatever you have set within your cycle group for sort order. Right now you are telling your chart to over-ride what is available for sorting within the cycle group properties and use one of the options available within the chart

infock12
Creator III
Creator III
Author

Hi Colin,

Thanks for the reply. I am using the below for month name

Date(MakeDate(Year(Attendance_Date), Month(Attendance_Date)) ,'MMM-YY') as MonthName

I wanted the other dimensions to be sorted by Y-value descending (expression descending).

When I tried the Default option as per your suggesion, I am getting other dimensions sorted by y-value descending but I am getting the monthname starting from Nov-16.

thomaslg_wq
Creator III
Creator III

Just add the month function so :

month(MakeDate(Year(Attendance_Date), Month(Attendance_Date))) as MonthName

Colin-Albert

Use the monthname function and the data will be created as a dual field and will sort correctly.

     monthname(Attendance_Date) as MonthName

infock12
Creator III
Creator III
Author

Hi all,

I have attached the sample file. Please let me know.

Thanks,

Karthik

infock12
Creator III
Creator III
Author

Thanks Thomas, I tried this but still didn't work. It sorts from Jan Oct Nov Sep, etc..

infock12
Creator III
Creator III
Author

Tried this Colin, but it gives Jan 16, Sept 15, Nov 2015, etc..