Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
rafael5958
Creator
Creator

merging rows

Hi, my situation, I have this:

 

BANKAGCOUNTTIPO         idname_personEND_RELACIONAMENTO_ATENDEND_RELACIONAMENTO_ANTEND1BEGINIG_RELACIONAMENTO_CBEGINIG_RELACIONAMENTO_CVINCULO_ATENDIMENTOVINCULO_C
1777111666112345678MARY31/12/9999-05/09/1983-T-
1777111666112345678MARY-- 05/09/1983-1

 

The bank, ag, count, tipo, id and name_person clolumns are always igual. How can I merge the other ones like:

 

BANKAGCOUNTTIPO         idname_personEND_RELACIONAMENTO_ATENDEND_RELACIONAMENTO_ANTEND1BEGINIG_RELACIONAMENTO_CBEGINIG_RELACIONAMENTO_CVINCULO_ATENDIMENTOVINCULO_C
1777111666112345678MARY31/12/9999-05/09/198305/09/1983T1

 

I could do it in expression or load if its easier.

Thanks.

 

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
saran7de
Master
Master

One solution is.

tab1:
LOAD * INLINE [
    BANK, AG, COUNT, TIPO, id, name_person, END_RELACIONAMENTO_ATEND, END_RELACIONAMENTO_ANTEND1, BEGINIG_RELACIONAMENTO_C, BEGINIG_RELACIONAMENTO_C2, VINCULO_ATENDIMENTO, VINCULO_C
    1, 777, 111666, 1, 12345678, MARY, 31/12/9999, , 05/09/1983, , T,
    1, 777, 111666, 1, 12345678, MARY, , , , 05/09/1983, , 1
];

NoConcatenate

tab2:
LOAD BANK, AG, COUNT, TIPO, id, name_person,
	Concat(DISTINCT END_RELACIONAMENTO_ATEND) As END_RELACIONAMENTO_ATEND,
	Concat(DISTINCT END_RELACIONAMENTO_ANTEND1) As END_RELACIONAMENTO_ANTEND1,
	Concat(DISTINCT BEGINIG_RELACIONAMENTO_C) As BEGINIG_RELACIONAMENTO_C,
	Concat(DISTINCT BEGINIG_RELACIONAMENTO_C2) As BEGINIG_RELACIONAMENTO_C2,
	Concat(DISTINCT VINCULO_ATENDIMENTO) As VINCULO_ATENDIMENTO,
	Concat(DISTINCT VINCULO_C) As VINCULO_C
Resident tab1
Group By BANK, AG, COUNT, TIPO, id, name_person;

Drop Table tab1;

View solution in original post

3 Replies
Kush
MVP
MVP

Do you have any measure in chart ?

saran7de
Master
Master

One solution is.

tab1:
LOAD * INLINE [
    BANK, AG, COUNT, TIPO, id, name_person, END_RELACIONAMENTO_ATEND, END_RELACIONAMENTO_ANTEND1, BEGINIG_RELACIONAMENTO_C, BEGINIG_RELACIONAMENTO_C2, VINCULO_ATENDIMENTO, VINCULO_C
    1, 777, 111666, 1, 12345678, MARY, 31/12/9999, , 05/09/1983, , T,
    1, 777, 111666, 1, 12345678, MARY, , , , 05/09/1983, , 1
];

NoConcatenate

tab2:
LOAD BANK, AG, COUNT, TIPO, id, name_person,
	Concat(DISTINCT END_RELACIONAMENTO_ATEND) As END_RELACIONAMENTO_ATEND,
	Concat(DISTINCT END_RELACIONAMENTO_ANTEND1) As END_RELACIONAMENTO_ANTEND1,
	Concat(DISTINCT BEGINIG_RELACIONAMENTO_C) As BEGINIG_RELACIONAMENTO_C,
	Concat(DISTINCT BEGINIG_RELACIONAMENTO_C2) As BEGINIG_RELACIONAMENTO_C2,
	Concat(DISTINCT VINCULO_ATENDIMENTO) As VINCULO_ATENDIMENTO,
	Concat(DISTINCT VINCULO_C) As VINCULO_C
Resident tab1
Group By BANK, AG, COUNT, TIPO, id, name_person;

Drop Table tab1;

View solution in original post

saran7de
Master
Master

Output.

commQV67.PNG