Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

three fields in one

Hi, I trying to join 3 tables "Castigo"  "RecCastigo" and "ComercioCartera" the field key is Cc_Cli (Customer Code) But this Cc_Cli in "Castigo" has another name and the same thing for "RecCastigo" so I concatenated "Castigo" and Rec.Castigo"  and renamed into "Castigo" the field CC_CLI as CodComercio, When I Do clic in Cod Comercio "Castigo" and " RecCastigo" Show me the real values so works fine. But I have to join another table call "ComercioCartera" This table has a Cc_Cli too when I renamed like CodComercio (Reference Circular appears) When Tried with applymap and concatenate (appears Synthetics Keys) and the values change completely. Wht I want is to do clic in "CodComercio" or "Comercio" and QlikView shows the real values. I don't want to 2 "Comercio"

Please help with this Im really stuck with this issue.

Thank you.

23 Replies
pgalvezt
Specialist
Specialist
Author

Sorry I forgot put the third table.

pgalvezt
Specialist
Specialist
Author

Any Help?

Thanks

bgerchikov
Partner - Creator III
Partner - Creator III

Hey,

Why wouldn't you just left join ComercioCartera to Castigo and then delete it?

BTW, your QVW doesn't have any data and doesn't show data model.

Thanks!

pgalvezt
Specialist
Specialist
Author

I did this but the values changed:

Castigo:
Left Join(ComercioCartera)
LOAD
CC_CLI as CodComercio,
Deuda_Castigo,
Periodo
    FROM

(qvd);

Drop Table ComercioCartera;

I took Concatenate From RecCastigo.

Any Help?

bgerchikov
Partner - Creator III
Partner - Creator III

I think your Left join statement is wrong. Try the following:

Castigo:

LOAD

CC_CLI,

Deuda_Castigo,

Periodo

    FROM

(qvd);

Left Join(Castigo) LOAD * Resident ComercioCartera;

Drop Table ComercioCartera;

rename CC_CLI to CodComercio;

pgalvezt
Specialist
Specialist
Author

3 Synthetic keys appears and the result was the same.

pgalvezt
Specialist
Specialist
Author

When I do clic in Cod Comercio works but Cod Comercio (Into ComercioCartera) Doesn't work.

bgerchikov
Partner - Creator III
Partner - Creator III

I did it without the data, but hope it's gonna work:

Cartera:

LOAD CodComercio&"-"&Periodo as Key,

    
Periodo,

 
Estado,

    
Cod_Bloqueo,

    
Vigente_Castigo,

    
Tipo_Cliente

    
Left(Clasificacion_Bin,2) as Clasificacion_Bin,

     'Tarjeta'
as LineadeNegocio,

     'Casa Matriz'
as Sucursal,

    
DiasMora,

    
Año,

    
Mes

    
Deuda_Total,

    
Num_Tarjeta_OP

    
DeudaK,

    
Source

FROM



(
qvd);



Castigo:

LOAD

CC_CLI as CodComercio,

Deuda_Castigo,

Periodo

FROM



(
qvd);



Recuperacion_Castigo:

Concatenate(Castigo)

LOAD

//ApplyMap('MappingCastigos',CodComercio) as CodComercio,

  CodComercio&"-"&Periodo as Key,

 
CodComercio,

    
Año_Bsc02,

    
Periodo

    
MontoPago as Recuperacion_Castigo

FROM



(
qvd);



ComercioCartera:

LOAD

    
Clasificacion_Bin,

    
CC_Cli as  CodComercio,

    
Comercio

FROM



(
qvd);



Left Join (Castigo) LOAD * Resident Recuperacion_Castigo;

Left Join (Castigo) LOAD * Resident ComercioCartera;



DROP Tables Recuperacion_Castigo,ComercioCartera;



LinkTable:

NoConcatenate LOAD

Key,

CodComercio,

Periodo

Resident Castigo;



Concatenate LOAD

Key,

CodComercio,

Periodo

Resident Cartera;



Drop Fields CodComercio,Periodo from Castigo, Cartera;

pgalvezt
Specialist
Specialist
Author

LOAD CodComercio&"-"&Periodo as Key,

CodComercio is not a field into the cartera (Bases Tarjetas) So qlikview falling out