Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comulate Customers

Hi All!

I have a problem.

I have a table with dates and customer ids.

I would like to create a chart which shows how many customers bought a product.

Data:

Date
Customer ID
2012.01.01.A
2012.01.01.B
2012.01.01.C
2012.01.02.A
2012.01.02.D
2012.01.03.A
2012.01.03.B
2012.01.03.C
2012.01.04.E

The result will be something like this:

2012.01.01. 3 (different customers bought product)

2012.01.02. 4 (different customers bought product)

2012.01.03. 5 (different customers bought product)

etc...

Please help me!

Thanks

W

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Check the attached file for solution.

Regards,

jagan.

View solution in original post

10 Replies
Not applicable
Author

The last row date is 2012.01.03. too.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     If you want this to be done in load script try like this

     Load

          Date,

          Count(Distinct CustomerID) as [# of Customers]

     Resident tablename Group by Date.

Celambarasan

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     If you need to do it in chart

     Use Date as Dimension.

     Count(Distinct CustomerID) as Expression.

Celambarasan

jagan
Partner - Champion III
Partner - Champion III

Hi,

Check the attachment for solution.

Regards,

Jagan.

Not applicable
Author

If I use simply Count(Distinct CustomerID) I get how many customers bought a product day by day. But I need how many customers bought the product until today.

(We started to sell a product 7 days ago. First day 3 customers have purchased, second day 4 customers have purchased, third day 5 or more customers purchased...)

I need something like this...

I really hope that I was clear.

Thanks

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try with this expression

     Expression label:[Count of Customers]

     =RangeSum(Count(Distinct CustomerID),Above([Count of Customers]))

Celambarasan

jagan
Partner - Champion III
Partner - Champion III

Hi,

Check the attached file for solution.

Regards,

jagan.

Not applicable
Author

Hi,

It is same as COUNT(Distinct CustomerId) with full accumulation.

This is not what Im looking for.

Sorry.

Anybody has a different idea?

Thanks

jagan
Partner - Champion III
Partner - Champion III

Hi,

Check the above attachment for solution.

Regards,

jagan.