Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
riceball
Contributor
Contributor

Aggregation (String)

Hi,

I've encountered some aggregation issue for my expression line in pivot table. Would appreciate some help from you guys

I would like my result to look like this (please see highlighted cells).This column will reflect my product name based on the category='Main' group by Country and Brand

Desired Output.jpg

Thank you very much!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try:  if(Category='Main',Product, aggr(NODISTINCT concat({<Category={'Main'}>}DISTINCT Product, ' & '),Country,Brand))

See attached example.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Try:  if(Category='Main',Product, aggr(NODISTINCT concat({<Category={'Main'}>}DISTINCT Product, ' & '),Country,Brand))

See attached example.


talk is cheap, supply exceeds demand
riceball
Contributor
Contributor
Author

It works wonders! Thank you so much for your help!!!

riceball
Contributor
Contributor
Author

Hi,

I wonder if there is any way I can load the expression into the script? I would like to have a listbox whereby my user can select the product name and the desired result (e.g: If Product A1 was selected, the listbox will show A4&A9 as possible selection)

I tried using resident load group by function but it doesn't seem to work.

Thanks!