Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey Qlik-Community,
I have a very special issue today, because I´m not sure how to structure my data.
To keep it simple, here is a very short version of my data model:
I have on table with sales data:
SALES:
Date,
ArticleNo,
CustomerNo,
POSNo,
Sales
Around this table I got some master data tables:
Customer:
CustomerNo,
CustomerName,
ZIP-Code (!)
Article:
ArticleNo,
ArticleName
POS:
POSNo,
POSName
So far so easy! Now it becomes a little bit more challenging....
Our customers are assigned to a POS depending on their ZIP-code. New table:
POS->Customer:
POSNo,
Customer Zip-Code
Just by joining all tables together I get of course a circular refference. I tried to solve it with a linked table, but I doesn't worked out. Additional problem: Allthough all customers are assigned to a POS, it could happen that a customer buys in a POS that is not assigned to him.
Any help is highly appreciated! 😃 Looking forward to read your comments
Hi @BjoernH, as you have two definitions of POS, you should have two POS tables, one for sales and another for assigned. That way you can even compare sales in assigned vs non-assigned POS.
Assigned POSNo should be in the Customers table (calculated from zip code), and associated to the new AssignedPOS table (similar to POS table, but with different field names to avoid circular references).
JG
Hey JuanGerardo, many thx for your help. I already suspected it 😉