When we want to sort data based on expression, we can go with Sort by Expression available in
- Qlikview: Properties–> Sort.
- Qliksense: Properties–>Sorting–>Field–>Custom Sorting–>
For Example the Quarter values may change according to measure, but the representation should be like Q1, Q2, Q3 and Q4. Below expression comes handy:
Match(Quarter,’Q1′,’Q2′,’Q3′,’Q4′)