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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kkkumar82
Specialist III
Specialist III

Sorting issue in Concat function

All,

I have created a expression in text box as =Concat(SalesManID,',') and I am selecting a Product in the list box.

My requirement is

Would like to see all the SalesmanID associated with the selected product.

I was able to see them using concat but when I am trying to sort them descending by their sales I failed.

I think I missed some thing in the aggr I used for sort weight.

Thanks

Kiran kumar

1 Solution

Accepted Solutions
maxgro
MVP
MVP

try

=Concat(distinct [Salesman ID],',', -aggr(NODISTINCT sum(Sales),[Salesman ID],[Product ID]))

View solution in original post

3 Replies
sunny_talwar

May be this:

=Concat(If(Aggr(Rank(Sum(Sales)),[Product ID],[Salesman ID])<=5,[Salesman ID]),',', Aggr(Rank(Sum(Sales)), [Product ID], [Salesman ID]))

Capture.PNG

maxgro
MVP
MVP

try

=Concat(distinct [Salesman ID],',', -aggr(NODISTINCT sum(Sales),[Salesman ID],[Product ID]))

kkkumar82
Specialist III
Specialist III
Author

Hi Maxgro,

I tried with altering the dimension list in aggr to ProductId and SalesmanId it was working fine, just curious to what "NoDistinct" is doing for sorting.

Can you delve here, about NoDistinct

Thanks

Kiran Kumar