Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to call the values

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..

2 Replies
Miguel_Angel_Baeyens

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

Not applicable
Author

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...