Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
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

nikithan
Contributor II
Contributor II

  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.