Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

samay
New Contributor II

Sort in particular order in dimension

Hi,

I have three dimension . date , country and populations. i want to make a pivot table  and  have atleast 20 country. i want to sort them at a particular order. such as  US, india , indonesia, canada, brazil..... how can i accompolsihed this in qlikview.

Thanks,

Samay

1 Solution

Accepted Solutions
nagaiank
Valued Contributor III

Re: Sort in particular order in dimension

You may load Country as a dual field and define the numeric sort order for the country name string as follows and then sort country field by numeric ascending/descending.

load dual (string,numrep) as Country inline [

string,numrep

US,0

India,1

Indonesia,2

Canada,3

Brazil,4

...

];

If you have a large number countries, you may load the above data from a spreadsheet, external text file or database file if necessary.

Hope this helps.


3 Replies
Not applicable

Sort in particular order in dimension

Hi,

Option is there in "Sort tab"

Regards,

Sri


nagaiank
Valued Contributor III

Re: Sort in particular order in dimension

You may load Country as a dual field and define the numeric sort order for the country name string as follows and then sort country field by numeric ascending/descending.

load dual (string,numrep) as Country inline [

string,numrep

US,0

India,1

Indonesia,2

Canada,3

Brazil,4

...

];

If you have a large number countries, you may load the above data from a spreadsheet, external text file or database file if necessary.

Hope this helps.


samay
New Contributor II

Sort in particular order in dimension

HI Krishna,

Thanks. it really works.

Thanks,

samay

Community Browser