Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Creating Data

Hey All,

I am trying to produce a table, where one of the columns are fabricated, and I am not sure if it is possible.

In my example I have Slot and Reactor - both of which are related in the data (though they come from different QVDs) and can be put in the table. In the example the red field is what I am trying to add - it is always five weeks later than when Reactor sits:

   

SlotReactorPurification
01/05/15
01/12/15Product 1
01/19/15
01/26/15Product 2
02/02/15
02/09/15Product 3
02/16/15 Product 1
02/23/15
03/02/15Product 4Product 2
03/09/15Product 5
03/16/15Product 6Product 3
03/23/15
03/30/15
04/06/15 Product 4
04/13/15 Product 5
04/20/15Product 6

I hope this makes sense to someone else, and is do-able.

Thanks,

Vince

6 Replies
MVP
MVP

Re: Creating Data

try this

SET DateFormat='MM/DD/YYYY';

a:

LOAD Slot,

     Reactor,

     Purification

FROM

[https://community.qlik.com/thread/178335]

(html, codepage is 1252, embedded labels, table is @1);

left join (a)

load

  date(Slot+35) as Slot,

  Reactor as PurificationCalc

Resident a;

1.png

Not applicable

Re: Creating Data

The problem is that slot and and reactor are from different tables so I do not know how to load them together.

MVP
MVP

Re: Creating Data

You need one or more common fields to join the two tables when you load the 2 qvd files.

Then, when you have one table, apply my script.


If you can, post the 2 qvd and explain how they are related.

Not applicable

Re: Creating Data

They link to one another through a third table and separate fields

Re: Creating Data

please provide sample data to clarify.

regards

Marco

crusader_
Valued Contributor

Re: Creating Data

Hi Vincent,

It's not a problem in fact.

If you matched these fields in your mind or in Excel spreasheet QlikView is able to do it as well.

Please provide more information or ER-diagram. It helps us to suggest a solutions for you.

Regards,

Andrei

Community Browser