Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to calculate what percentage of customers spending over a certain level have bought products from us.
Using this syntax I can count the number of customers spending more than £1000 based on my current selection (which is fine).
=count({$<location_id={"=sum(customer_gross_sales)>1000"} >} location_id)
I can use the same syntax to say how many customers spending more than £1000 are buying each product.
What I don't know how to do is get the count of the total number of customers spending more than £1000 and use it to divide the number of customers spending more than £1000 on each product by?
Do I need to use a variable?
You just need the word "total" in your denominator, assuming that product is the dimension of your chart.
count({<location_id={"=sum(customer_gross_sales)>1000"} >} location_id)
/
count({<location_id={"=sum(customer_gross_sales)>1000"} >} total location_id)
If you have other dimensions in the chart, then you would need <> brackets after the word total and include all dimensions in there except for Product. For example, total <Country,Date>
Regards,
Vlad
You just need the word "total" in your denominator, assuming that product is the dimension of your chart.
count({<location_id={"=sum(customer_gross_sales)>1000"} >} location_id)
/
count({<location_id={"=sum(customer_gross_sales)>1000"} >} total location_id)
If you have other dimensions in the chart, then you would need <> brackets after the word total and include all dimensions in there except for Product. For example, total <Country,Date>
Regards,
Vlad
Thanks Vlad. That's exactly what I needed to do. I want to evolve this to be able to show the product penetration over time but that can wait until another iteration.
Thanks very much for your help