Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

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