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: 
Not applicable

Concat Help

Hi all,

I have loaded a table which is a transaction table showing the sales by Product,Year,Month ..etc

I have taken two list box ProductID, Year and a text box Year,

I just want to display the years associated with the ProductId when a product is selected, so far that I have used Concat function in the

text box and later got a thought to sort the displayed years in the ext box in descending order but to my strange I am getting the years

twice in the text box.

Please advice what might me wrong.

Iam attaching my sample

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

=' The values selected in year field are' &chr(13)&

Concat(DISTINCT Year,CHR(10),-Aggr(NODISTINCT SUM(Sales),Year))

or

=' The values selected in year field are' &chr(13)&

Concat(DISTINCT Year ,chr(13),-Aggr(NoDistinct Sum(Sales),[Product ID] ,Year))

View solution in original post

4 Replies
MK_QSL
MVP
MVP

=' The values selected in year field are' &chr(13)&

Concat(DISTINCT Year,CHR(10),-Aggr(NODISTINCT SUM(Sales),Year))

or

=' The values selected in year field are' &chr(13)&

Concat(DISTINCT Year ,chr(13),-Aggr(NoDistinct Sum(Sales),[Product ID] ,Year))

Not applicable
Author

Thanks manish,

Can you throw some light on whats happening with that "NoDistinct" in the Aggr

Not applicable
Author

Thanks for the links