Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
patbuchanan
New Contributor III

How do I Group Text Values Together from Multiple Records

I have a table that has multiple records for and ID based on how many Rooms are associated to that ID and I'm trying to present one record for each ID that has all the Rooms associated with the ID combined in one field.

So, I'm trying to convert:

Rows.JPG.jpg

To:

Columns.JPG.jpg

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: How do I Group Text Values Together from Multiple Records

Depends on where you want to do this.

In script:

Load ID, Concat(distinct Room,',') as [Room(s)]
From Table.qvd (qvd)
group by ID;

In chart.

Dimension: ID
Expression: Concat(distinct Room,',')

Regards

SKG

View solution in original post

6 Replies
Highlighted
Partner
Partner

Re: How do I Group Text Values Together from Multiple Records

Depends on where you want to do this.

In script:

Load ID, Concat(distinct Room,',') as [Room(s)]
From Table.qvd (qvd)
group by ID;

In chart.

Dimension: ID
Expression: Concat(distinct Room,',')

Regards

SKG

View solution in original post

Highlighted
MVP
MVP

Re: How do I Group Text Values Together from Multiple Records

load ID, concat(Room, ', ') as Rooms

from yoursourcetable

group by ID;

Highlighted
Employee
Employee

Re: How do I Group Text Values Together from Multiple Records

Worth putting a 'distinct' in there so it doesn't repeat values (if that is a possibility)

Concat( distinct  Room,',')

Highlighted
Partner
Partner

Re: How do I Group Text Values Together from Multiple Records

I agree. I will edit my response.

Highlighted

Re: How do I Group Text Values Together from Multiple Records

Try this

Load ID,Concat(Room,',') as Rooms Group by ID;

Load * Inline

[

ID,Room

100,Room1

100,Room3

101,Room1

101,Room2

];

Regards

ASHFAQ

Highlighted
Not applicable

Re: How do I Group Text Values Together from Multiple Records

HI Pat hope you help this

Try this both

In script:

Load ID, Concat(distinct Room,',') as [Room(s)]
From Table.qvd (qvd)
group by ID;

or

Load ID,Concat(Room,',') as Rooms Group by ID;

Load * Inline

[

ID,Room

100,Room1

100,Room3

101,Room1

101,Room2

];