Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Join? Link? Map? Help

Hi

I have a table of sales by supplier:

MonthSupplierSales
JanA1488
JanB1301
JanC1267
FebA1373
FebB1307
FebC1228
MarA1816
MarB1101
MarC1885

And a table of sales by customer:

MonthCustomerSales
JanX2668
JanY978
JanZ410
FebX815
FebY348
FebZ2745
MarX1515
MarY1734
MarZ1553

I want to create a table that shows sales by customer AND supplier that would look like this:

MonthSupplierCustomerSales
JanAX979
JanAY359
JanAZ150
JanBX856
JanBY314
JanBZ132
JanCX833
JanCY306
JanCZ128
FebAX286
FebAY122
FebAZ964
FebBX273
FebBY116
FebBZ918
FebCX256
FebCY109
FebCZ863
MarAX573
MarAY656
MarAZ587
MarBX347
MarBY398
MarBZ356
MarCX595
MarCY681
MarCZ610

I have no other information to link the 2 tables other than date as it's just forecast information.  How is this possible?

Thanks

13 Replies
Not applicable
Author

I have a question - both tables have sales but one is for customer and the other is for supplier - If you wnated to put everytung in one table, wouldnt you need sales for both?

if you wnat to create one table from 2 and you want columns from both, you would need to do a join

Anonymous
Not applicable
Author

Its just forecast information so I have sales by customer or sales by supplier but I don't have both.  That's what I want to create in the script.  A join doesn't work as I get null values for supplier where there is a customer and vice versa

Not applicable
Author

I still do not understand which of the 2 Sales fields you have, you are showing in your consolidated table

attached is the output based on the sample data you provided (I created 2 excel spreadsheets and renamed the sales fileds to avoid synthetic key

are you looking for a relationship between customer and supplier?

Anonymous
Not applicable
Author

can you attach the qvw so I can have a look at what you did?

Not applicable
Author

sure - see attached

Anonymous
Not applicable
Author

based on my data in January supplier A supplied 36.7% of all sales in January therefore supplier A sold 36.7% of sales to customer X.  36.7% of 2668 is 979.  Does that make sense?

Digvijay_Singh

I think without knowing which supplier supplies to which customer and the value of sales between them, it wouldn't be possible to create the right model.

Anonymous
Not applicable
Author

I just want to assume that proportion of sales by supplier applies to each individual customer.  I know that in January supplier A supplied 36.7% of all sales in January therefore supplier A sold 36.7% of sales to customer X.

Not applicable
Author

I agree based on the numbers  in January(total customer sales of 4056) and supplier sales for Supplier A (1488) equates to supplier A accounting for 36.7% of the January.  I am not sure that the percentage is evenly split amongst the customers, unless that is a assumption or understanding you have