- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Creating a link between two .QVD
Hi All,
I have two QVDs that need to link together so I can create various charts, tables, etc on the back off this match.
The Opportunity.qvd should contain the date field [Opportunity_StageAudit.Date], which is contained in the Opp_stage.qvd.
How do I do this in the script?
All help much appreciated
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to use the JOIN LOAD in order to "merge" two tables, very similar to what you would do with SQL. Loading the files with the same field will associate them, so unless you need to join both tables in a single, bigger one, the results should be correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the rest of the fields in each QVD have a different name, do a
Stage:
LOAD *
FROM Opp_stage.qvw (qvd);
Opp:
LOAD *
FROM Opportunity.qvd (qvd);
And that will load both tables so you can start with the charts and analysis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If the Date Format is same in two QVDs and [Opportunity_StageAudit.Date] is the only Key field in both QVDs you can directly load two QVDs. Qlik will join two tables with common field.
If you are looking for more details, share the Sample Data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Miguel,
Thanks for the response. Will that do the join between the two tables? As below, the other calendars are linked to the Opportunity table and I am looking to join the table on the right (Stage_Calendar) to the Opportunity table via the date field [Opportunity_StageAudit.Date]. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thats the issue, the [Opportunity_StageAudit.Date] is one QVD and not the other. Im looking to create a join between the two.
There is infact an Opp_ID filed that is common to both tables - could I join this way via the script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[Stage Change Date] and [Opportunity_StageAudit.Date] have same format and if you wish to join using these two dates you can just use [Stage Change Date] as [Opportunity_StageAudit.Date] while loading the second table.
If the Opp_ID exist in two tables automatically join will be done, if name is different you need to RENAME any one field in any one table.
For Example:
Stage:
LOAD *,
[Stage Change Date] as [Opportunity_StageAudit.Date]
FROM Opp_stage.qvw (qvd);
Opp:
LOAD *
FROM Opportunity.qvd (qvd);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hope you have qualified the Opportunity Table. Unqualify the [Opportunity_StageAudit.Date] in the Opprotunity Table to do the automatic join.
Wrote below statement after the Opportunity table load.
UNQUALIFY [Opportunity_StageAudit.Date];
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to use the JOIN LOAD in order to "merge" two tables, very similar to what you would do with SQL. Loading the files with the same field will associate them, so unless you need to join both tables in a single, bigger one, the results should be correct