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: 
Not applicable

adding same dimension to fact table

Hi,

How do I load the tables below to my data model without creating a circular reference?

Ideally I don't want to have two sets of variables for each currency field since there are many fields in this model anyway.

FXRateCurrency
FXIDCurrencyID
CurrencyFromIDCurrency Name
CurrencyToIDCurrency Code
Rate
Date
1 Solution

Accepted Solutions
migueldelval
Specialist
Specialist

Hi Shauncass,

Try this example please and tell me.

Regards

Miguel del Valle

View solution in original post

8 Replies
migueldelval
Specialist
Specialist

Hi Shaun,

FXRATE:

Load

FXID,

CurrencyFromID,

CurrencyToID,

Rate,

Date;

From SQL [...];

left join

CURRENCY:

Load

CurrencyID,

CurrencyName,

CurrencyCode;

From SQL [...];


Try it, but it´s better to attach all your data model to see it.


Regards


Miguel del Valle

Not applicable
Author

Sorry Miguel. I wasn't clear.
I need the CURRENCY.CurrencyID to join on FXRATE.CurrencyFromID
I also need the CURRENCY.CurrencyID to join on FXRATE.CurrencyToID

migueldelval
Specialist
Specialist

Sorry Shauncass, but I can´t understan you.

If you want to join tables you need same field equal in both tables to make a relationship.

Attach an example of data, please.

Regards

Miguel del Valle

Not applicable
Author

My data looks as follows;

CURRENCY

CurrencyID     CurrencyName     CurrencyCode

1                    US Dollar             USD

2                    Euro                     EUR

3                    British Pound        GBP

FXRATE

FXID              CurrencyFromID     CurrencyToID     Rate

1                    1                           2                        0.90

2                    1                           3                        0.74

3                    2                           3                        0.83

In my dashboard I want to represent something similar to the following;

FXID              CurrencyFrom     CurrencyTo     Rate

1                    USD                   EUR               0.90

2                    USD                   GBP               0.74

3                    EUR                   GBP               0.83

migueldelval
Specialist
Specialist

Hi Shauncass,

Try this example please and tell me.

Regards

Miguel del Valle

Not applicable
Author

Miguel,


This looks perfect, how did you go about achieving it? What is in your load script?

migueldelval
Specialist
Specialist

Hi shauncass,

I made a fact table with the equivalent values.

Regards

Miguel del Valle

Not applicable
Author

Thank you