Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulm
Contributor III
Contributor III

Creating a cross reference

Hi,

I have a tricky issue with trying to cross reference a main data source with a special selection.  To help explain this I have mocked up an example qvw.

There are two tables, firstly the MAIN data table has an id, a date and a value.  The second is a SELECTION table which has an ID, start and end date ranges along with a "product code". 

I would like to cross reference the MAIN with a "selection" table so that for each ID I would be able to filter the main data source to only show the specific product code that has been selected.  So in this example if I selected TUO1 I would see ID 1 for ranges 04/02/2010 - 06/02/2012 and ID 2 for 02/02/2010 - 06/02/2012

The way that has been tried in the example is a left join, and then I would use the date ranges to create a filter.  The only issue is that the left join creates duplicate fields for all the TEST.VALUE values.

Hopefully I have explained it correctly.  If you need any further information please let me know.

Any help would be greatly appreciated

Paul

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I think there are multiple ways to achieve your expected result, for example, you can try using an INTERVALMATCH.

See attached.

Hope this helps,

Stefan

View solution in original post

3 Replies
swuehl
MVP
MVP

I think there are multiple ways to achieve your expected result, for example, you can try using an INTERVALMATCH.

See attached.

Hope this helps,

Stefan

MayilVahanan

Hi,

     See the attached file..

     Hope it helps..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
paulm
Contributor III
Contributor III
Author

Hi Guys,

Thanks for the help with this.  It worked perfectly.

Paul