Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Kunkulis
Creator
Creator

Merging multiple rows into one, but always show the rest of the values when one is chosen

Hello,

I have a data set with some information, this would be some dummy data:

Person Country
Kunkulis USA
Kunkulis Germany
Kunkulis Spain

 

From other question I have found, that by just using this formula:

=Aggr(Concat(DISTINCT Country, ', '), Person)

I will get the desired outcome:

Person Country
Kunkulis USA, Germany, Spain

 

But now if I would filter out, to show all the Person that have been to USA, I get this result:

Person Country
Kunkulis USA

 

Where I would like to see this (with additional dummies):

Person Country
Kunkulis USA, Germany, Spain
Bob USA
Rob Canada, Portugal, Sweden, USA

 

Any idea how this could be achieved? 

Labels (3)
14 Replies
Kunkulis
Creator
Creator
Author

Sorry, but what is this? I don't see it in QlikView, also selecting rows, just uses them as selections

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Why a dimension and not a measure?  If you want to make it a Dimension you will have to wrap it in an Aggr like your first posting. 

-Rob

Schaefer
Contributor II
Contributor II

Select the range of cells where you want to merge rows.Go to the Ablebits Data tab > Merge group, click the Merge Cells arrow, and then click Merge Rows into One.

RealcompOnline

Kunkulis
Creator
Creator
Author

Our application has been setup like that. It is a Chart (straight table) that you create by checking boxes in the window, so based on the selections, the table columns appear. I guess due to that it is setup as dimensions.

So, is there a way for the cell to be merged into one as fixed values? Or this has to be done in script? If it is the script path, then would it be possible to have the list box with single countries? 

Kunkulis
Creator
Creator
Author

I think I got the result I was looking for.
I did it all in script.

One table as it was with all the data without any manipulation.
Second table just Loading Person and Concatenate Countries, resident initial table group by Person.

Then in the chart table I show the concatenated column, but in the listbox, I show the first tables country list