Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Read about Qlik’s Response to COVID-19 Read the Letter, Join the Group.
Highlighted
New Contributor III

Customer Sorting in QV List Box

I have below List of Countries..

Data:

Load * Inline

[

  Country

  (Not Specified)

  USA

  India

  UK

  Germany

  France

  Canada

];

I want to create a List Box which will sort all Countries according to text format but (Not Specified) should come at last.

How to achieve this?

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Customer Sorting in QV List Box

On the Sort pane, check both "Text" and "Expression". Use this for the sort expression:

match(Country,'(Not Specified)')

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

10 Replies
Highlighted
Honored Contributor III

Re: Customer Sorting in QV List Box

Put all values in the correct order and in the list box sort by "load order".

May you live in interesting times!
Highlighted
New Contributor III

Re: Customer Sorting in QV List Box

I can't do that... It is coming from SQL database and I have more than 200 countries.

Highlighted
Not applicable

Re: Customer Sorting in QV List Box

Highlighted
New Contributor III

Re: Customer Sorting in QV List Box

There is nothing there which can help me in my problem.

Highlighted
MVP & Luminary
MVP & Luminary

Re: Customer Sorting in QV List Box

On the Sort pane, check both "Text" and "Expression". Use this for the sort expression:

match(Country,'(Not Specified)')

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

Highlighted
Honored Contributor III

Re: Customer Sorting in QV List Box

What you could do is still create the INLINE table with all the values in the order you like, next load the actual data from the database, next drop that INLINE table, and still end up sorting by load order .

May you live in interesting times!
Highlighted
New Contributor III

Re: Customer Sorting in QV List Box

How can I create an Inline table if I don't know exactly how many and which countries are going to appear from database. Your solution is not the one which could help me. But yes, thanks for your reply !

Highlighted
New Contributor III

Re: Customer Sorting in QV List Box

Hi Rob Wunderlich,

This is what exactly I want. It's working perfectly.

Could you please let me know how it works?

Highlighted
Honored Contributor III

Re: Customer Sorting in QV List Box

Here are 3 ways to create an inline table that does what you need. The actual countries in your dataset is not relevant for every solution.

  • The number of countries in this world is limited to about 250. A few minutes of Google can probably get you a complete list. Wikipedia comes to mind.
  • Alternatively you can load your data once and next make use of the tool you get with the INLINE wizard to simply create an INLINE table that lists all possible values in your data source. It is a matter of selecting the field and importing the data.
  • As a 3rd alternative (when you can't figure out how the previous wizard works) is to simply load your data, create a ListBox for country, export it (already sorted) to XLS, make adjustments if needed to the order, and turn that into an INLINE table.
May you live in interesting times!