Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new Qlikview
I have a fact table and dimension table. Dim table should join fact table with two key columns.
Like
Fact_fla table is having keys like below
fla_assgn_to_key
fla_assgn_from_key
revenue
fla_status_count
.
.
.
And Dimension table
Dim_con
con_key
.
.
I want to join like
select * from fact_fla,Dim_con
where fla_assgn_to_key=con_key
and fla_assgn_from_key=con_key
Please help me on this scenario.
Regards,
Kumar
You can create a composite key like the below
Fact:
Load
Autonumber(fla_assgn_to_key&fla_assgn_from_key) AS KEY,
fla_assgn_to_key,
fla_assgn_from_key
revenue
fla_status_count
From FACT;
Dim:
Load
Autonumber(con_key&con_key) AS KEY,
con_key
From DIM;
You can create a composite key like the below
Fact:
Load
Autonumber(fla_assgn_to_key&fla_assgn_from_key) AS KEY,
fla_assgn_to_key,
fla_assgn_from_key
revenue
fla_status_count
From FACT;
Dim:
Load
Autonumber(con_key&con_key) AS KEY,
con_key
From DIM;
to join in Qlik just rename (with same name, in bold) the 2 fields you want to join
FactTable:
load
fla_assgn_to_key,
fla_assgn_from_key,
.....; // other fields of fact table
SQL select *
from fact_fla;
join (FactTable)
load
con_key as fla_assgn_to_key,
con_key as fla_assgn_from_key,
...........; // other fields of dimension table
SQL select *
from Dim_con;
Hi,
Please try like this:
Hope this will help you.
FactTbale:
Load
Autonumber(fla_assgn_to_key&fla_assgn_from_key) as Key,
fla_assgn_to_key,
fla_assgn_from_key,
revenue,
fla_status_count
From FactTbale;
DimensionTable:
Load
Autonumber(con_key&con_key) AS KEY,
con_key,Dim_con
From DimensionTable;
Hi All,
Thanks a lot. It helps me a lot.
Regards,
Kumar
HI Reddy,
GLad to be a part of the answer