Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
The last row date is 2012.01.03. too.
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
Hi,
If you need to do it in chart
Use Date as Dimension.
Count(Distinct CustomerID) as Expression.
Celambarasan
Hi,
Check the attachment for solution.
Regards,
Jagan.
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
Hi,
Try with this expression
Expression label:[Count of Customers]
=RangeSum(Count(Distinct CustomerID),Above([Count of Customers]))
Celambarasan
Hi,
Check the attached file for solution.
Regards,
jagan.
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
Hi,
Check the above attachment for solution.
Regards,
jagan.