Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to figure out how to create a bar chart that will count which customers have purchased multiple products. I need this to be on the front end through the use of an expression.
I already created one chart that will count how many customers have purchased a single product.
the expression I used for this was:
Count({$<Status = {'Invoices'}, Amount = {">0"}>}DISTINCT([Ship To Customer Account Name]))
I hope I have given enough information.
Thanks,
Chris
I would do an expression search (The Expression Search) inside the Set Analysis:
Count({$<Customer={"=Count(distinct Product)>1"}>} distinct Customer )
HIC
what happens if you sue the same expression and remove 'Distinct' - that will show everything - customers that have 1 and customers that have more than 1
you can alsways subtract your 2 expressions - the one you ahve will give you the ones that have just 1 product and the other (which takes yours and the one without distinct) would give you the ones that have more than 1
The customer could still have multiple orders of the same product. I used the distinct to remove that possibility. I may be wrong in my logic, but I thought that is what I was doing.
it looks like the expression is looking at invoices, not products to distinct customers, so I believe you would get all invoices to distinct customers, not necessarily products to distince customers - each invoce has multiple items (products I would think).
any way for you to send a qvw?
Here is a quick QVW that you should be able to use.
Thanks,
if I understand, customers A,D each have 1 product, B,C have 2 products?
it looks like this does not ahve the same fiels (status for example), but if my understanding above is correct, should not be an issue
You are correct customers A,D each have 1 product, B,C have 2 products.
The QVW I am working with is over a gig with information so I created a simple qvw. I used status in my original QVW as a way to filter out customers that maybe have an open PO but have not yet purchased a product.
i just did a reload and updated the applciaiton - you may run into an issue with the distinct because you have 1 of each customer -
thie expressions are simpler than what you need to do based on your ture model but hopefully this will help
I would do an expression search (The Expression Search) inside the Set Analysis:
Count({$<Customer={"=Count(distinct Product)>1"}>} distinct Customer )
HIC
Thank you both for your suggestions. Very Helpful!