Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Combining two data models into one

Hi ALL, I have created a dashboard on audit analysis and now want to combine fact table of audit dashboard into the fact of some other dashboard Following is the scenario :- I have two dashboards For dashboard1(newly created) I have firstly extracted the data from database and stored in qvd for dashboard 1(audit dashboard) then I have applied business logic on stage 2 and then again stored in qvd now I want to combine fact table of audit dashboard into some other fact of already existing dashboard Please help meto resolve the above scenario. Regards Sakshi
12 Replies
Highlighted
Partner
Partner

Re: Combining two data models into one

Not compltely clear on your question but usual approach is You can either concatenate fact tables or you can create Link table based on the scenarios.
below is a technical brief on combining fact tables

https://community.qlik.com/t5/Qlik-Design-Blog/Fact-Table-with-Mixed-Granularity/ba-p/1468238
Highlighted
Creator II
Creator II

Re: Combining two data models into one

Hi Thanks for your reply. I am having following data model after I have concatenated new fact into already existing fact. I am getting duplicate keys so, I want to know do I have to make a composite key for the same ?
Highlighted
Partner
Partner

Re: Combining two data models into one

If you are concatenating fact tables you should create a new column e g. Facttype. Then you refer to that in set analysis

E.g.

 

Highlighted
Creator II
Creator II

Re: Combining two data models into one

Hi 

can you please explain with a eg?

 

Highlighted

Re: Combining two data models into one

I may suggest load old QVW to new qvw using binary load.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator II
Creator II

Re: Combining two data models into one

clipboard_image_0.png

after I have applied binary load I am getting the following result, Now how to handle the same ?

Both the data models have calendar so now how to manage these calender?

Highlighted

Re: Combining two data models into one

Drop the calendar in Old qvw and use same date field from old and new then create Calendar in new qvw for latest date field.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator II
Creator II

Re: Combining two data models into one

Hi date field in new calender is diff and date field in old calendar is different. Now how to deal with that?
Highlighted

Re: Combining two data models into one

If those date fields are different If there is any Primary key which can read the all clubbed rows.

Old_Fact:

Load Old_DF as DateField Resident Fact1;

Concatenate(Old_Fact)

Load New_DF as DateField Resident Fact2;

All other dimension table are follows. Then, Create master calendar based on DateField which is same from all fact tables.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)