4 Replies Latest reply: Jul 3, 2014 10:33 AM by Peter Thornton RSS

    Counting customers with spend between certain values

    Peter Thornton

      I'm trying to build a table which counts the number of customers spending in pre specified bands. Someone had asked a similar question a couple of years ago and got an answer which I can't make work for some reason.


      In our data customers are location_id, sales are customer_gross_sales.


      For my first spend segment I've written the following piece of set analysis:


      =count({$<location_id={"sum(customer_gross_sales)>0"}*{"=sum(customer_gross_sales)<1000"}>} distinct location_id)


      For the dimension I've put yr_date (which brings up Jan_2014 etc.


      No data has populated my table


      Is my formula to count customers wrong, or should I be using a different dimension?