Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all
I have a problem designing the data model in QV.
In de appendix (pdf) I wrote down a simple draft of my database.
The second page was the idea i had, but it didn't work, because to many records.
The result of this report should be:
1. Which products and customers where in the campaign (not buying, only promoted)
2. Which products where purchased from which customer (really bought the products)
These two Questions should be answered but there is another thing:
1. In one case, we know the campaign and products, but no customers
-> Unknown amount of customers
2. In the other case, we know the campaign and customers
-> Unkown amount of products
3. In the thirth case, we know the campaign, the products and the customers
-> The full set is clear
4. And in the last case, we only know the campaign (we promoted all products to all costomers in a range of time)
-> So we have two unknown set's
I really running out of ideas, because either there are to many datas, or I'll get a circular reference.
I hope, someone could help me.
Thanks in adv.
Greetings
Ramon
finally I could solve the problem with setanalysis and alternate states.
so i was able to get de min. common amount and max. common amount without calculation all combinations of it.
greetings
Ramon
Your plan to create a kartesic product with your data is especially to begin not a good idea - you should first built a simply/normal data-model. In your case the circular reference should be solved first - see an example here:
http://community.qlik.com/blogs/qlikviewdesignblog/2013/06/25/circular-references
- Marcus
Dear rschweizer,
Please look for an attachment. I hope this could be a solution for the scenario you are facing.
Regards,
Gaurav Malhotra
Try to make ur data model like ONE TO ONE.
There are four master Like Customer,Product,Campaign & Calender.
And One Fact Table..
Try to map each master one to one with Fact table..
Hope it will help u
Dear Marcus
thank you for reply.
I Think, I was confusing and unclear with my draft, because I don't really have a circular problem in the case I would join the tables together.
Da model is like in de appendix QV002.pdf
I only would make clear, that I have to use the major tables like customer and product.
But surely I didn't connet them together, only used for joining the datas.
BR
Ramon
Dear "garry qv"
Hmm, sure, but I can't handle the amount of records comming by joining the data, remember:
300K Customers x 600K Products x 100 Campaigns.
Even the SQL Server is running until now about 3hours and 20 minutes, and is still running 🙂
BR
Ramon
Dear "bika_2010"
How sould I do that?
If a have a unkown amount of campaigns?
You mean, I should create a column for each campaign in my fact-table?
Like:
product customer campaign001, campaign002, campaign003 etc?
BR
Ramon
Hi Ramon,
you don't need these joins - tables will be automatically linked from qv per common fields. Load first the fact-table and then step by step the dimensions-tables and built in the GUI simply tableboxes and pivots and you will see that nearly all results what you want is there. If you have then further needs, you could then thinking about more complex data-modelling.
Generally joins are difficult, often it is better to use mapping and applymap to match data to another tables.
- Marcus
Hi Marcus
why not? I think I couldn't explain the point of my problem enought.
I need to know all possible combinations of Customers, Products an Campaigns, because some Customers or Products even all Customers and Products can be unknown, means empty.
A case:
Normaly in a campaign you have a amount of customers and products. So, you will promote some known products to a group of customers. That's simple, and jey, no joins are needed.
BUT:
We have campaigns, where you will promote a set of products to ALL of your customers, or promote ALL products to a SET of customers.
Worst case:
We have campaigns, where ALL products are promoted to ALL customers, only the time might be different.
The result-set should not only show, which are buying customers and what they bought, no, the result-set also should show which customers and products where in this campaign, and which products where boughts from which customer over time.
Therefore I tried to join some tables, to get the max. possible combinations.
If I prevent joining, so I will get the ugly circular references, because the fact table also contains custimers and products.
BR
Ramon
Only if you really want show null-values in tables you must create such a cartesian product (all possible values) then tables could only show data there are real. But through the QV logic to associate data of green/white/grey you can see which combines from data has promotes/sales and which have not.
Cartesian products are not really recommended because the consumption from resources (CPU/RAM) is extremly high and the benefit is most often very less. There are a lot of things which are more important to analyse.
If you will nevertheless create such a cartesian product you should the sql data load first in qv and then joining them - have also a look on the taskmanager to see the ressources ...
- Marcus