Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count instances on load

Hi There

I am loading several seperate datasets which all look something like this;

CUSTOMER_idINFO
0100A
0200B
0300C
0200A
0100B

I am concatenating the datasets on load and once that is done I want the load script to assign a count to each CUSTOMER_id.

So for the example above I would like to see this;

CUSTOMER_idINFOCustomer_Count
0100A2

0200

B2
0300C1
0200A2
0100B

2

How can I set and store the count?

Thanks

JW

1 Solution

Accepted Solutions
maxgro
MVP
MVP

a:

LOAD CUSTOMER_id,

     INFO

FROM

[https://community.qlik.com/thread/165076]

(html, codepage is 1252, embedded labels, table is @1);

left join (a)

LOAD CUSTOMER_id, count(CUSTOMER_id) as Customer_Count Resident a group by CUSTOMER_id;

View solution in original post

5 Replies
maxgro
MVP
MVP

a:

LOAD CUSTOMER_id,

     INFO

FROM

[https://community.qlik.com/thread/165076]

(html, codepage is 1252, embedded labels, table is @1);

left join (a)

LOAD CUSTOMER_id, count(CUSTOMER_id) as Customer_Count Resident a group by CUSTOMER_id;

sunny_talwar

Try this script:

Table:

LOAD CUSTOMER_id,

     INFO

FROM

[https://community.qlik.com/thread/165076]

(html, codepage is 1252, embedded labels, table is @1);

Join (Table)

LOAD CUSTOMER_id,

  Count(CUSTOMER_id) AS Customer_Count

Resident Table

Group By CUSTOMER_id;

maxgro
MVP
MVP

mayba also in a chart

2 dimension        CUSTOMER_id INFO

expression          count(TOTAL <CUSTOMER_id> CUSTOMER_id)

Not applicable
Author

Hi Massimo

Wow, that was quick!

Fantastic, this worked perfectly.  Thank you so much.

JW

Not applicable
Author

Sunindia

Fab, thank you.

JW