Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I count how many tickets that have only bought one product? And nothing else.
HI. I have a Fact table with products and checknumber that customer have bought. How can I count how many tickets that have only bought the selected product(s) and nothing else.
Thanks
*************** UPDATE ***************
I have the following fields:
BusinessUnitID, Date, CheckNumber, Product, Sales, Quantity
Ticket 178 must be counted because only has one product
Ticket 5799 has more than one product and doesnt be counted
Im need to count tickets where only appear product 863023.
Thanks again
Do you want to count the tickets that bought just a single product and that product must be in a specific selection/list, or do you want to count tickets that only bought products from a specific selection but the total number is not important?
1) How can I count how many tickets that have only bought one product? And nothing else.
Count({$<Prouct = {'Product Name'}>}Ticket)
Can you explain second one
Try this
=Count({$<Ticket=P({1<Customer={$(=Count(Total <Customer> Product) =1)}>}Customer)>}Ticket)
This first counts the Total number of products that a customer bought and returns those customer if count=1(who bought only 1 product) and then count the number of Tickets for those who bought only one product.
Hope this helps
I need to count the tickets that bought just a single product p.e Product 864520
Yes, Have you tried my expression
Count({<product = {'864520'}>} tickets)
If you select the product(s) you want to count tickets for in a list box, then you could use an expression like this:
=count({<ticketno *= {"=count({1} DISTINCT Product) = 1"}>} ticketno)
I used imaginary field names because your OP didn't mention actual fields. Replace them where necessary.
Also don't mind the syntax error that the expression editor reports on the *= operator. The operator is ok, but the syntax checker doesn't now that (yet).
Best,
Peter