Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to sort concatenated field

Hello there,

I created a field called QuarterYear where I concatenated the Quarter & year fields. I now want to display this field in an descending order i.e. I want it to be sorted as Q4-2016 Q3-2016  Q2-2016 Q1-2016 Q4-2015 Q3-2015  etc. How should I go about this?

Thanks,

3 Replies
gamaescalante
Contributor III
Contributor III

I've had success by sorting by the expression:



Quarter


Custom Sort


Sort by Expression


Quarter & '-' & Year

Descending Order

Anonymous
Not applicable
Author

  1. Check Expression box- Add only 'Year' field and select sort by Descending.
  2. Along with this Check Text box and Sort order 'Z->A'

Let us know if this works.

Not applicable
Author

Hi,

In the Sort tab, please check the 'sort by expression' and uncheck rest of the options.

Use the expression:

=Right([Your_Field],4)&mid([Your_Field],2,1)

From the dropdown choose 'ascending' or 'descending' according to your need. It should work.