Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the table Department and a Fact table. The Fact table has two foreign keys END_DEP and START_DEP to the Department's primary key.
To map them in QlikView I created two more columns of the DEP_KEY in the Department dimension, which have the same name as the ones in the Fact table. In QlikView I have:
SQL SELECT "DEP_KEY",
"DEP_KEY" AS "START_DEP",
"DEP_KEY" AS "END_DEP",
"DEP_NAME"
FROM NEWKIRK.DEPARTMENT;
SQL SELECT DAYS,
"END_DEP",
"START_DEP",
STATUS
FROM NEWKIRK.FACT;
It creates synthetic keys, but I don't know if that is really what I want. I want two different relations from the Fact to the Department table.
Any ideas?
Keep two Tables, One for Start_Dep, and one for End_Dep.
Or
if the Department has just the Dep_Key and Name, Do a join and bring Name into the Fact as Start_Dep_Name and End_Dep_Name