Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've been away from QV for 3 years and am very rusty - would love some guidance on what I am trying to accomplish.
I have a sales database that contains a lot of transaction.
I would like to create a histogram of the numbers of customers (by aggregating their transactions) for specified price bands. For example:
Sales Customer Count
$0-20k 3
$20-$40k 7
$40-$60k 3
etc.
I'm fine with creating a table first to get te rust off and then making a chart out of it.
Thanks in advance,
Rick
Dear Rick,
You can do one thing, you can create this table in script itself.
Something like this.
LOAD Distinct
Item,
Customer,
if(Sum(Sales)>=0 and Sum(Sales)<=20,'$0-20K',
if(Sum(Sales)>=21 and Sum(Sales)<=40,'$21-40K',
................) as Bucket.
From Xyz group by Item,Customer;
Now you can create a chart and then count the customers by Bucket.
Regards,
Kaushik Solanki
Hi, you could use the class function either in your load script or as a calculated dimension, that way you won't have to do a nested if fir every sales group eg:
LOAD Distinct
Item,
Customer,
Sales
class(Sales,10000,'$') as Bucket.
From Xyz ;
Thanks
Steve