Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
neetking
Contributor
Contributor

multiple user fields in fact table and one dimension user

hi everyone,

I'm new in Qlik Sense,  I don't have any idea how to link my dimension user with multiple fields (users) in my fact table.

this my fact and dimension tables : 

Fact_INC:

ID_inc

id_user_create

id_user_assigne

id_user_resolve

and dim table :

Dim_USER:

id_user

user_name

I tried to make a link table but without success.

 

Thank you in advance for your help

Labels (2)
1 Solution

Accepted Solutions
vivek_gajjar01
Partner - Contributor II
Partner - Contributor II

You could create a bridge table in between your fact table and the dimension table. So your bridge table script could look something like: 

UserBridge:
LOAD ID_inc, 'Created' as UserRecordType, id_user_create as id_user    Resident Fact_INC;
Concatenate (UserBridge)
LOAD ID_inc, 'Assigne' as UserRecordType, id_user_assigne as id_user   Resident Fact_INC;
Concatenate (UserBridge)
LOAD ID_inc, 'Resolve' as UserRecordType, id_user_resolve as id_user   Resident Fact_INC;

 

So the bridge table will join to the Fact table using the ID_inc field and would join the Users table using the id_user field. But one thing to note here will be that you may need to get the users to select the UserRecordType or handle it within the set analysis of expressions depending on what you're trying to do. 

So effectively you would have 3 tables with the following fields:

Fact INC:

ID_inc

 

UserBridge:

ID_inc

UserRecordType

id_user

 

Users:

id_user

user_name

View solution in original post

2 Replies
Almen
Creator II
Creator II

You need to have one common field in both tables to link them.

vivek_gajjar01
Partner - Contributor II
Partner - Contributor II

You could create a bridge table in between your fact table and the dimension table. So your bridge table script could look something like: 

UserBridge:
LOAD ID_inc, 'Created' as UserRecordType, id_user_create as id_user    Resident Fact_INC;
Concatenate (UserBridge)
LOAD ID_inc, 'Assigne' as UserRecordType, id_user_assigne as id_user   Resident Fact_INC;
Concatenate (UserBridge)
LOAD ID_inc, 'Resolve' as UserRecordType, id_user_resolve as id_user   Resident Fact_INC;

 

So the bridge table will join to the Fact table using the ID_inc field and would join the Users table using the id_user field. But one thing to note here will be that you may need to get the users to select the UserRecordType or handle it within the set analysis of expressions depending on what you're trying to do. 

So effectively you would have 3 tables with the following fields:

Fact INC:

ID_inc

 

UserBridge:

ID_inc

UserRecordType

id_user

 

Users:

id_user

user_name