Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Concat sort order

Hi guys,

This is puzzling me so I hope you can help.  I am trying to sort on a concat expression

Concat(distinct product_size1, ', ',product_size_alpha)

For some reason this isn't sorting by product_size_alpha though.  Unless I am missing something...?!

Capture.PNG

When i try the expression above I get this output

Capture1.PNG

Does the sort order within a concat expression not work when alphabetical?

Hoping someone can help because this is driving me mad !

10 Replies
sunny_talwar

Try this

Concat(distinct product_size1, ', ', Rank(product_size_alpha))

Anonymous
Not applicable
Author

Error in expression

Capture2.PNG

sunny_talwar

Try clicking okay to see if it gives you any output or does it just says no output displayed or something similar?

sunny_talwar

This worked for me

=Concat(DISTINCT Product_Size1, ', ', -Aggr(Rank(Product_Size_Alpha), Product_Size1))


Capture.PNG

adamdavi3s
Master
Master

don't think rank works in a concat?

Maybe use Dual or lob a pick(match()) in there?

sunny_talwar

It seems to have worked with Aggr()

Anonymous
Not applicable
Author

I've used this

=Concat(DISTINCT product_size1, ', ', -Aggr(Rank(product_size_alpha), product_size1))

Still hasn't worked..

Capture4.PNG

sunny_talwar

Would you be able to share a sample where this hasn't worked? Or look at what I attached and see what the difference is between what I posted and what you have

vishsaggi
Champion III
Champion III

Extending Sunny's expr: Try like: Are you trying to aggr based on your Product_Size_Alpha right ?

=Concat(DISTINCT product_size1, ', ', -Aggr(Rank(product_size_alpha), product_size_alpha))