Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
marakud971
Contributor III
Contributor III

How to play with iteration ?

Hi everyone,

I need your help for understand how to make a iteration table in qlikview.

For example, i have this table of data :

CODENUM CLIENTTHEME
1NUM1Assistance
2NUM1Assistance
3NUM2Réclamation
4NUM2Réclamation
5NUM2Réclamation
6NUM3Résiliation 
7NUM4Acte commercial
8NUM4Acte commercial
9NUM5Acte commercial
10NUM5Acte commercial
11NUM5Acte commercial
12NUM5Acte commercial

 

I need to theses 2 analisis tables :

Nb d'iteration : number of time "num client" appear.
Nb num client : number of "num client" appear.

Nb d'iterationNb num client 
11(NUM3)
22(NUM1 & NUM4)
31(NUM2)
51(NUM5)

 

AND

Themenumber of iteration 
Assistance1(NUM1)
Réclamation1(NUM2)
Résiliation 0 
Acte commercial2(NUM3 & NUM4)

 

It is understandable ? Any Ideas ?

Thanks a lot 🙂

 

Harry

3 Replies
HirisH_V7
Master
Master

Hi  i hope i understood your'e requirement upto an extent. Please check the following code :

Temp:

LOAD * INLINE [
 
    CODE, NUM_CLIENT, THEME
    1, NUM1, Assistance
    2, NUM1, Assistance
    3, NUM2, Réclamation
    4, NUM2, Réclamation
    5, NUM2, Réclamation
    6, NUM3, Résiliation 
    7, NUM4, Acte commercial
    8, NUM4, Acte commercial
    9, NUM5, Acte commercial
    10, NUM5, Acte commercial
    11, NUM5, Acte commercial
    12, NUM5, Acte commercial
];

Data:

Load THEME,NUM_CLIENT,
Count(NUM_CLIENT) as Nbnumclient 
Resident Temp Group by  NUM_CLIENT,THEME;


Join

Load Nbnumclient,Concat(NUM_CLIENT,',') as Concat 
Resident Data
Group By Nbnumclient;

DROP Table Temp;
//use Below for Iteration

//Load NUM_CLIENT,THEME,
//If(Peek(NUM_CLIENT)=NUM_CLIENT,Peek(nclient)+1,1) as nclient  
//Resident Temp  Order by CODE,NUM_CLIENT asc;

Also Find attached QVW for ref;

HTH,

HirisH

HirisH
“Aspire to Inspire before we Expire!”
marakud971
Contributor III
Contributor III
Author

hi ! thanks, i will try this solution to tell you if i can result my case with it.

HirisH_V7
Master
Master

ok ..
HirisH
“Aspire to Inspire before we Expire!”