Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
egeremia
Contributor II
Contributor II

Custom order to concatenated list

I am trying to create a table like you see here:

Capture2.PNG

Except we want to order the concatenated list by the # of QuoteID's for each state (Highest # first) and not like it is (alphabetically). Here is the table with the states not concatenated and you will see the # of QuoteID's for each Description + State:

Capture.PNG

So for Accountant /  Bookkeeper the order would be VT, ME, NH, NY, CT, RI, MA

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Add Quote.Description to the Aggr like this:

Concat(DISTINCT Quote.State, ',', -Aggr(NODISTINCT Count(DISTINCT QuoteID), Quote.State, Quote.Description))

-Rob

View solution in original post

6 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think it would be:

Concat(DISTINCT Quote.State, ',', -Aggr(NODISTINCT Count(DISTINCT QuoteID), Quote.State))

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

egeremia
Contributor II
Contributor II
Author

Thank you for your response! This helped but only when one Quote.Description is selected. When the whole table is shown, the order is all jumbled:

Capture.PNGCapture1.PNG

Anyway for this to be consistent? 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The heading on your second column looks funny. Is that the expression you are using or something you hardcoded in the Label? Can you show the exact expression you are using in the Measure?

-Rob

egeremia
Contributor II
Contributor II
Author

Sorry yes it was hardcoded and left accidently but the expression is the one you provided

Capture.PNG

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Add Quote.Description to the Aggr like this:

Concat(DISTINCT Quote.State, ',', -Aggr(NODISTINCT Count(DISTINCT QuoteID), Quote.State, Quote.Description))

-Rob

egeremia
Contributor II
Contributor II
Author

That did the trick, thank you!