Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I need your help for understand how to make a iteration table in qlikview.
For example, i have this table of data :
| 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 |
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'iteration | Nb num client | |
| 1 | 1 | (NUM3) |
| 2 | 2 | (NUM1 & NUM4) |
| 3 | 1 | (NUM2) |
| 5 | 1 | (NUM5) |
AND
| Theme | number of iteration | |
| Assistance | 1 | (NUM1) |
| Réclamation | 1 | (NUM2) |
| Résiliation | 0 | |
| Acte commercial | 2 | (NUM3 & NUM4) |
It is understandable ? Any Ideas ?
Thanks a lot 🙂
Harry
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
hi ! thanks, i will try this solution to tell you if i can result my case with it.