Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kira_whopper
Creator
Creator

Generating fields according to other table's values

Hi there,

I'm having some trouble trying to solve this issue:

I have the vendor table with these fields:

CODE_VENDORDATE_ADM
0126/06/2013
0210/09/2013
0315/10/2013
0420/10/2013
0519/11/2013

And the periods table with these fields:

Period_StartPeriod_End
25/06/201320/12/2013
24/07/201323/01/2014
24/08/201323/02/2014
25/09/201324/03/2014
24/10/201322/04/2014
26/11/201325/05/2014
21/12/201319/06/2014
24/01/201423/07/2014

What I need to to is create records for each vendor, starting from the first period available until the last registered.

That would generate this for vendor 01, for example:    

CODE_VENDORDATE_ADMPeriod_StartPeriod_End
0126/06/201325/06/201320/12/2013
0126/06/201321/12/201319/06/2014

Each period is 6months large.

Any ideas?

1 Solution

Accepted Solutions
kira_whopper
Creator
Creator
Author

Thanks,

Using what you suggested and some other stuff I looked into qlikview documentation, I figured out the solution.

Hope it can help you with similar issues o/

View solution in original post

4 Replies
Not applicable

Hi Marcos

I think IntervalMatch may be what you're looking for

Lukasz

Not applicable

Below script may help you ...

 

Vendor:

LOAD * INLINE [
CODE_VENDOR, DATE_ADM
01, 26/06/2013
02, 10/09/2013
03, 15/10/2013
04, 20/10/2013
05, 19/11/2013
]
;

Period:
LOAD * Inline [
Period_Start, Period_End
25/06/2013, 20/12/2013
24/07/2013, 23/01/2014
24/08/2013, 23/02/2014
25/09/2013, 24/03/2014
24/10/2013, 22/04/2014
26/11/2013, 25/05/2014
21/12/2013, 19/06/2014
24/01/2014, 23/07/2014
]
;

IntervalMatch(DATE_ADM)
LOAD Period_Start, Period_End
Resident Period;

kira_whopper
Creator
Creator
Author

Thanks,

Using what you suggested and some other stuff I looked into qlikview documentation, I figured out the solution.

Hope it can help you with similar issues o/