Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

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!

Tags (1)
14 Replies
Highlighted

Re: Data model information

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

Highlighted
Not applicable

Re: Data model information

Example for you:

Highlighted
MVP & Luminary
MVP & Luminary

Re: Data model information

See attached qvw.


talk is cheap, supply exceeds demand
Highlighted
Partner
Partner

Re: Data model information

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

Highlighted
Partner
Partner

Re: Data model information

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

Highlighted
MVP & Luminary
MVP & Luminary

Re: Data model information

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
Highlighted
Partner
Partner

Re: Data model information

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

Highlighted
Partner
Partner

Re: Data model information

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

Highlighted
Not applicable

Re: Data model information

Hello,

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

Nik.