Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all
I have two tables like Product,Customer
Product table is
CustID CustName ProdID
1 XXXXX 1
2 YYYYY 2,4,6
3 jjjjjjjjjj 2,9
5 kkkkkk 1,9
Customer table contains
ProdID Prod
1 gggggg
2 asaa
3 jkkllllll
upto 10 records.......
I want to calculate, number of customer having this Product..
i.e., count (customer) in y-axis and products as the dimension(X-axis)..
ProductID is upto 1-10(fixed)..
could anyone help me..
how to do this one....
thanks in advance..
Hello,
Use something like the following script to get each customer with only one product
Data:LOAD * INLINE [CustID, CustName, ProdID1, XXXXX, '1'2, YYYYY, '2,4,6'3, jjjjjjjjjj, '2,9'5, kkkkkk, '1,9']; Products:NOCONCATENATE LOAD CustID, CustName, SubField(ProdID, ',') AS ProdIDRESIDENT Data; DROP TABLE Data;
Hope this helps
Hi Miguel,
subfield function is working fine...
but when i use the subfield function,the single row repeated many times based on the values in the ProdID field...
Is there any other way to do this without splitting the rows...
thnx for ur help...