Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Sorting

these are the values

<100k

100k-250k

250k-1M

1M-3M

3M+

ENN

NHH

and I want them to appear in the same manner in the people chart

but the sorting isn't working.

I tried adding 1,2,3 numbers before these and sort them numerically but it is still not working

any way I can get this done?

10 Replies
MVP
MVP

Re: Sorting

Where are you using this? You can use Dual function to assign these numerical values if you want

Not applicable

Re: Sorting

People chart

How to use Dual Function?

These are the values that are there in excel data sheet but they appear in random order.

I want them to be in this order strictly

MVP
MVP

Re: Sorting

Something like this:

Dual(FieldName, Match(FieldName, '<100k', '100k-250k', '250k-1M', '1M-3M', '3M+', 'ENN', 'NHH'))

MVP
MVP

Re: Sorting

What is a people chart? I have never seen it before?

Not applicable

Re: Sorting

reddys310
Honored Contributor II

Re: Sorting

Hi Sagarika,

If you have numbers for each of the values in your data model, you can use that filed in the "sort by expression" property in the properties panel.

Not applicable

Re: Sorting

yes I have numbers. for ex: <100k I have some 40K people again for 100k-250k I have 50k people and so on.

I have tried using sort by expression

what code shall I use in the expression exactly?

I have tried everything

if, match, dual etc

reddys310
Honored Contributor II

Re: Sorting

HI Sagarika,

Is it possible to share your qvf?

arulsettu
Honored Contributor III

Re: Sorting

may be try like this

load * inline [

filedname,s_no

<100k,1

100k-250k,2

250k-1M,3

1M-3M,4

3M+,5

ENN,6

NHH,7

];

in sort by expression give  s_no