Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

LOAD count

 

Good morning,

 

I try to count the nb of reinsurers per file, knowing that my data is grouped by ref1, ref2 and layer_no.

 

Systems returns "Invalid expression" with the code below. Could you please let me know where is the mistake ?

 

 

temp:
LOAD ref1,
ref2,
layer_no,
clm_rein_dist_no,
...,
...

 

FROM [zzzz] ;

 

 

Table_count:
LOAD
Distinct
*,
count (clm_rein_dist_no) as NbReassureurs
Resident temp
Group by ref1, ref2, layer_no ;
DROP
Table temp;

 

 

For example :

 

   

ref1ref2layer_noclm_rein_dist_no
PR0015632 A 11
PR0015632 A 12
PR0015632 A 13
PR0015632 A 14
PR0015632 A 21
PR0015632 A 22
PR0015632 B 11
PR0015632 B 12
PR0015632 B 13
PR0015632 B 14
PR0015632 B 21
PR0015632 B 22

 

I expect the below result :

   

   

ref1ref2layer_noNbReassureurs
PR0015632 A 14
PR0015632 B22
PR0015632 A 14
PR0015632 B22

Thank you in advance for your help

 

1 Solution

Accepted Solutions
MVP
MVP

Re: LOAD count

Try this

temp:
LOAD ref1,
ref2,
layer_no,
clm_rein_dist_no,
...,
...

FROM [zzzz] ;

Table_count:
LOAD ref1,

    ref2,

    layer_no,
    count (clm_rein_dist_no) as NbReassureurs
Resident temp
Group by ref1, ref2, layer_no ;
DROP Table temp;

2 Replies
MVP
MVP

Re: LOAD count

Try this

temp:
LOAD ref1,
ref2,
layer_no,
clm_rein_dist_no,
...,
...

FROM [zzzz] ;

Table_count:
LOAD ref1,

    ref2,

    layer_no,
    count (clm_rein_dist_no) as NbReassureurs
Resident temp
Group by ref1, ref2, layer_no ;
DROP Table temp;

Not applicable

Re: LOAD count

This works fine, thank you