Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
nboccassini
Partner - Creator
Partner - Creator

Data model information

Hi,

I need help for modeling data in qlikview. I have these table:

Table A contains information of the relation of dealer (of my company) and the competitor of other company (external competitor) and competitor in my company (internal competitor)

TABLE A:
DEALER_IDINTERNAL_COMPETITOREXTERNAL_COMPETITOR_ID
142
237
342
43

Table B contains prices of one product for the external competitor

TABLE B:
EXTERNAL_COMPETITOR_IDDATEPRICE
101/04/20142,45
201/04/20146,34
301/04/201435,34
401/04/201434,46
501/04/20142,56
601/04/201464,1
701/04/201445,45

Table C contains prices for the dealer of my company (so DEALER_ID and INTERNAL_COMPETITOR):

TABLE C:
DEALER_IDDATEPRICE
101/04/2014223,64
201/04/201464,2
301/04/20147,33
401/04/201434,88
501/04/201421,03
601/04/201444,88
701/04/201414,21

I want to realize a report like this:

DEALER_IDCOMPETITORCOMPANYDATAPRICE DEALERPRICE COMPETITOR
14INTERNAL01/04/2014223,6434,46
12EXTERNAL01/04/2014223,6464,2
23INTERNAL01/04/201464,27,33
27EXTERNAL01/04/201464,245,45
34INTERNAL01/04/2014
32EXTERNAL01/04/2014
43EXTERNAL01/04/2014

The problem is the internal competitor, because prices for these dealer that I want in the column PRICE COMPETITOR are in the same table A of the PRICE DEALER.

How can I model the data? I know that I can duplicate the information for the internal competitor and put it in the TABLE B, but I want to avoid this solution because the real tables are big (4GB Data).

Thanks!

14 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Non so se ho ben compreso il problema ma potresti utilizzare nel caricamento dei dati un alias cioè quando carichi:

Select

...

Price as PriceB

...

From Table B

Not applicable

Example for you:

Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand
nboccassini
Partner - Creator
Partner - Creator
Author

This solution works, but it duplicate data and for my project it's equal to 3-4Gb of data plus the original data

nboccassini
Partner - Creator
Partner - Creator
Author

This solution don't duplicate data but I can't see in each row the price for dealer and its competitor

Gysbert_Wassenaar

Are you sure you didn't overlook the drop table statement? There's only one resulting table after the entire script has run.


talk is cheap, supply exceeds demand
nboccassini
Partner - Creator
Partner - Creator
Author

Ma questo significherebbe duplicarmi una marea di dati che nel mio caso significherebbe aggiungere altri 3-4 Gb di dati.

nboccassini
Partner - Creator
Partner - Creator
Author

I know it, but for example, the price for the DEALER 4 (INTERNAL) is in the column PRICE and PRICE_DEALER

Not applicable

Hello,

if the table A is small then you can try the method from example in attach.
I wish it helps.

Nik.