Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I 'm analysing a POS (Point of Sale data) for one of retail organisation. I have a column(Field) with Biil No and another colmun with item code. One bill can have multiple line items with respect to item purchased by customer.
I wanted to create a bucket of items purchased like 0-10 , 11-20, 21-50 and so on.
How do I create a field in the script which will contain no of items purchased against a bill.
POS:
LOAD [ORG CD],
num([BILL NO]) as [BILL NO],
date([BILL DT],'DD/MM/YY') as [BILL DT],
weekday([BILL DT]) as WK,
Date(Monthstart([BILL DT]), 'MMM-YYYY') as M_Y,
[ITM CD] as Item,
UOMCD,
QTY,
[SELL PRICE],
[OLD SELLPRICE],
[NET VALUE],
[VOID FLAG],
[COUNTER NO]
FROM C:\Retail\POS\QVD2\POS_DATA.qvd (qvd);
I have attached a sample data file.
I Look foward to quick response.
Regards,
Bikash Jain
Hi Bikash,
you can use the Class() function to create buckets. Check the reference manuals!
Regards,
Fernando
Something like:
ItemCount:
LOAD
[BILL NO],
count(Item) as ItemCount
RESIDENT POS
GROUP By [BILL NO]
;
-Rob