Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

Re: How to count instances on load

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;

5 Replies
MVP
MVP

Re: How to count instances on load

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;

Re: How to count instances on load

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;

MVP
MVP

Re: How to count instances on load

mayba also in a chart

2 dimension        CUSTOMER_id INFO

expression          count(TOTAL <CUSTOMER_id> CUSTOMER_id)

Not applicable

Re: How to count instances on load

Hi Massimo

Wow, that was quick!

Fantastic, this worked perfectly.  Thank you so much.

JW

Not applicable

Re: How to count instances on load

Sunindia

Fab, thank you.

JW

Community Browser