Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Group Cells?

In script I need some help to combine cells. Column REASON includes the values to be grouped into one cell by column "KEY". Below example.

Is there any way to do it?

Main column:

KeyREASON
ABC1R01
ABC1R02
ABC1R03
ABC1R04
ABC2R02
ABC2R03
ABC2R04
ABC2R05
ABC2R06
ABC2R07
ABC2R08

To be:

KeyREASON_ALL
ABC1R01|R02|R03|R04
ABC2R02|R03|R04|R05|R06|R07|R08
1 Solution

Accepted Solutions
er_mohit
Master II
Master II

load

Key,Concat(Reason,'|') as Reason

from table group by Key;

View solution in original post

3 Replies
er_mohit
Master II
Master II

load

Key,Concat(Reason,'|') as Reason

from table group by Key;

hic
Former Employee
Former Employee

The Concat() function does exactly this. It can be used either in the script or in the QlikView UI.

     Concat(distinct REASON, '|')

HIC

alexandros17
Partner - Champion III
Partner - Champion III

LOAD Key, Concat(REASON,'|') as reasonAll

Resident Test

Group By Key;