Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
May 18th 10AM ET, Live Chat, bring your QlikView questions. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
andreina
Contributor
Contributor

Two columns from a fact table goes to a one column of a dimension table. Modeling in QV

Hello,

We have the following scenario:

1.- There is one table ( fact table) wich has Customer Invoices from differente Providers. It has the fields: POSTAL_CODE_CUSTOMER and POSTAL_CODE_PROVIDER

2.- There is one table ( dimension) wich has Postal Codes: a key field called ID_POSTAL_CODE and a POSTAL_CODE_DESC field wich has the description

3.- POSTAL_CODE_CLIENT and POSTAL_CODE_PROVIDER fields are related with the field ID_POSTAL_CODE

So, if we would like to Model this case in QV and we want to analyse our invoices by POSTAL_CODE_PROVIDER and by POSTAL_CODE_CUSTOMER in independent ways, Do I Have to duplicade the POSTAL CODES table, one just to pointer the POSTAL_CODE_PROVIDER and the other one to POSTAL_CODE_CUSTOMER? theres any better way to not duplicate it?

AS

Postal_Codes_CUSTOMER:
Directory;
LOAD ID_POSTAL_CODE AS PC_CUSTOMER,
POSTAL_CODE_DESC
FROM

....

Postal_Codes_PROVIDER:
Directory;
LOAD ID_POSTAL_CODE AS PC_PROVIDER,
POSTAL_CODE_DESC
FROM

....

INVOICES:

LOAD POSTAL_CODE_PROVIDER AS PC_PROVIDER,

POSTAL_CODE_CUSTOMER AS PC_CUSTOMER,

...

Thank you very much for your soon answer,

Regards,

Andreina[:)]

1 Reply
fernandotoledo
Partner
Partner

That´s the way man, just take care with the fields with the description that should be renamed to