Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concat and relative values

Hi all,

I have a table:

Company 1

Company 1

Company 2

Company 3

I would like it to be aggregated in a following way:

[Company 1]2;[Company 2]1;[Company 3]1

Is there any possibility to add values to concat() function? Or maybe anyone could give a hint which function can be used instead?

Thanks

1 Reply
hector
Specialist
Specialist

Hi, for this script


TMP_DATA:
LOAD
*
INLINE [
F0, F1
All Companies, Company 1
All Companies, Company 1
All Companies, Company 2
All Companies, Company 3
];

DATA:
Load
F0,
concat(distinct '['& F1 & ']' & C,';') as F1_Concat
group by
F0
;
Load
F0,
F1,
count(F1) as C
resident TMP_DATA
group by
F0,
F1
;

drop table TMP_DATA;


This is my result

Rgds