Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concatanation Problems

Hello Evrebody

Someone can help me please , ii think i have a problem with my concatenation problem

I have 2 x the same months

Please see the source code in the att

Sans titre.png

//************************************ Chargement du Fichier de Versemennt PEE ***************************************//

Versement :

LOAD

     Matricule as VPEE_Matricule,

  [Nouvelle Numerotation] as Pivot_NouvelleNumerotation,

     Nom as VPEE_Nom,

     Prénom as VPEE_Prénom,

     interessement AS VPEE_Interessement,

     participation as VPEE_Patricipation,

     exceptionnel as VPEE_Exceptionnel,

   

     P01 as VPEE_Montant1,

     F01 as VPEE_Fond1,

  P02 as VPEE_Montant2,

     F02 as VPEE_Fond2,

   

     P03 as VPEE_Montant3,

     F03 as VPEE_Fond3,

     P04 as VPEE_Montant4,

     F04 as VPEE_Fond4,

     P05 as VPEE_Montant5,

     F05 as VPEE_Fond5,

     P06 as VPEE_Montant6,

     F06 as VPEE_Fond6,

     P07 as VPEE_Montant7,

     F07 as VPEE_Fond7,

     P08 as VPEE_Montant8,

     F08 as VPEE_Fond8,

     P09 as VPEE_Montant9,

     F09 as VPEE_Fond9,

     P10 as VPEE_Montant10,

     F10 as VPEE_Fond10,

     P11 as VPEE_Montant11,

     F11 as VPEE_Fond11,

     P12 as VPEE_Montant12,

     F12 as VPEE_Fond12,

     P01+P02+P03 as VPEE_TotaleGeneral

   

     //+P04+P05+P06+P07+P08+P08+P10+P11+P12

  

FROM

(biff, embedded labels, table is [export site$]);

//**************************************************** Chargement du salaire **************************** //

Requette :

LOAD

  monthname ( '2014-02-1') as date  ,

  Matr. as VPEE_Matricule,

     Montant as Fichier_Salaire_Montant,

   

     [Salaire Base Th] as [Fichier_Salaire_Salaire Base Th],

     Quart as Fichier_Salaire_Quart,

  

  

     [Etabl. (SIRET)] as Fichier_Salaire_Etablissement

  

FROM

(biff, embedded labels, table is Feuil1$);

Concatenate

LOAD

  monthname ( '2014-03-1') as date  ,

  Matr. as VPEE_Matricule,

     Montant as Fichier_Salaire_Montant,

     [Salaire Base Th] as [Fichier_Salaire_Salaire Base Th],

     Quart as Fichier_Salaire_Quart,

 

     [Etabl. (SIRET)] as Fichier_Salaire_Etablissement

   

FROM

(biff, embedded labels, table is Feuil1$);

//LOAD  VPEE_Matricule,

//

//( Quart - VPEE_TotaleGeneral ) as Ecart 

// Resident Versement ; 

// DROP Table Versement;

//******************************************* Calcul  de l'ecart *******************************************//

V2:

Load

Matricule as VPEE_Matricule,

P01+P02+P03 as VPEE_TotaleGeneral

FROM

(biff, embedded labels, table is [export site$]);

join(V2)

load

  Matr. as VPEE_Matricule,

  monthname ( '2014-02-1') as Mois,

  Quart

  FROM

(biff, embedded labels, table is Feuil1$);

LOAD

  VPEE_Matricule,

  Mois,

( Quart - VPEE_TotaleGeneral ) as Ecart 

Resident V2 ; 

DROP Table V2;

V3:

Load

Matricule as VPEE_Matricule,

P01+P02+P03 as VPEE_TotaleGeneral

FROM

(biff, embedded labels, table is [export site$]);

join(V3)

load

  Matr. as VPEE_Matricule,

  Quart ,

  monthname ( '2014-03-1') as Mois

  FROM

(biff, embedded labels, table is Feuil1$);

LOAD

  VPEE_Matricule,

  Mois,

( Quart - VPEE_TotaleGeneral ) as Ecart 

Resident V3 ; 

  DROP Table V3  ;

1 Solution

Accepted Solutions
Ferran_Garcia_Pagans
Former Employee
Former Employee

Because, the table chart you have in your application creates all possible combination between table Raquette and table V2-1.

test.JPG.jpg

If you use VPEE_Matricule as link  there is 2 possible salaries for a matricule. If you use VPEE_Matricule+Month as a link, there is only one possible salary per month and matricule.

Ferran.

View solution in original post

14 Replies
Not applicable
Author

Data, data model or expressions may cause this kind of problem.

Your script looks a little strange for me

May you show screenshot your expressions and data model (Ctrl+T) or even better attach your application with sample data.

regards

Darek

rohit214
Creator III
Creator III

hi,

check with your Fichier_Salaries_Quart since it comes from diffrent table and i think there is no link between aur concatenate table and Requette table.

thanks

rohit

Not applicable
Author

Please See the att

Not applicable
Author

The links between in VPEE_Matricule,

Please see this sample example

Ferran_Garcia_Pagans
Former Employee
Former Employee

Ben,

I'm not sure about what are you trying to do but the table chart shows what yo have in the tables (data model).

test.JPG.jpg

If you are trying to accomplish oe salary per month the link between tables should be VPEE_Matricule+Month

Ferran.

Not applicable
Author

Ben,

in my opinion you should work a little to perfect your data model. Try with star or snowflake schema. Sorry, but your model looks rather strange. I dont know what data volume you expect in your application, because sometimes  developer have to do some "strange" things with model to get better performance. But in your case it rather doesn't look like this case.

I found, that for one key you have 2 records in each table. So, it is not strange that your tablebox schows cartesian

regards

Darek

Not applicable
Author

Ferran

Yes that what i m searching for

But where i soulld add  VPEE_Matricule+Month ??

Thank u for your help

Ferran_Garcia_Pagans
Former Employee
Former Employee

Because, the table chart you have in your application creates all possible combination between table Raquette and table V2-1.

test.JPG.jpg

If you use VPEE_Matricule as link  there is 2 possible salaries for a matricule. If you use VPEE_Matricule+Month as a link, there is only one possible salary per month and matricule.

Ferran.

Not applicable
Author

Ferran

Thank u for your help , I indersteand now

But can you attached me the source code please

Because i dont have the same result as you