Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Breezy
Creator II
Creator II

Expression for responsive table title

I created a table. I have an issue with the table title. There are ten options in my dropdown menu. When I click an individual option (such as Region 5) my table title correctly changes to read: "Region 5". If I click "Region 4" and "Region 7" from the dropdown menu,  I will have "Region 4, Region 7". If I do not click any of the options the title defaults to "National". However, every time I include "Region 10" in the title, it appears first, "Region 10, Region 4, Region 5." It should read in proper order, "Region 4, Region 5, Region 10." How do I place the 10 at the end in the title?

Breezy_0-1643126172754.png

Here is my expression:

=if(Count(GetCurrentSelections()) > 0, Concat(Distinct Region, ', '), 'National')

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The Concat() function take an optional third parameter, "sort-weight", a field used to control sorting.  You can generate an additional field to use as the sort-weight like this:

RegionSort:
LOAD
'Region ' & RecNo() as Region,
RecNo() as RegionSort
AutoGenerate 10
; 

And then your Concat is:

Concat(Distinct Region, ', ', RegionSort)

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

 

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The Concat() function take an optional third parameter, "sort-weight", a field used to control sorting.  You can generate an additional field to use as the sort-weight like this:

RegionSort:
LOAD
'Region ' & RecNo() as Region,
RecNo() as RegionSort
AutoGenerate 10
; 

And then your Concat is:

Concat(Distinct Region, ', ', RegionSort)

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

 

Breezy
Creator II
Creator II
Author

Wow! That did the trick! Thanks so much Rob! 🙂