Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
julioarriaga
Creator II
Creator II

How do I filter information "Field1(Date)>Field2(Date)" for future objects?

Hello everyone,

I would like to ask for your kind help. This should be a simple thing but I haven't found an aswer.

Here's the thing. I am making an analysis of potential misaligned transactions and part of the criteria is if the Field1>Field2 (both are dates). How can I make this filter in qlikview so future objects that I create follow this criteria. Can this be made from the script or the sheet or something similar? Sadly I cannot share the information.

The information comes from a binary. I can see and edit the binary in theory, but the problem is that the original tables are not available, so in my understanding I cannot reload the binary.

I would not like to make a resident load as to my understanding they're intesively RAM taxing and my  database is enormous.

Again, thanks for your help.

Julio

1 Solution

Accepted Solutions
Gysbert_Wassenaar

If those two fields in one table the you can calculate this easily in the script. Since you don't want to use a resident load you can store that table in a qvd, drop the table, load the data again from the qvd and calculate a new field to filter on:

Binary \\myserver\data\myqvwdoc.qvw;

Store MyTable into MyTable.qvd (qvd);

Drop MyTable;

MyTable:

LOAD

     *, If(Field1>Field2,1,0) as f_Field1IsLargerThenField2

FROM

     MyTable.qvd (qvd)

     ;


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
swuehl
MVP
MVP

Not really sure if I understood what you are trying to do.

You can limit your complete table to the records of interest by adding something like this your your script:

INNER JOIN (YourTable)

LOAD PrimaryKeyOfYourTable

RESIDENT YourTable

WHERE Field1 > Field2;

or maybe

INNER JOIN (YourTable)

LOAD Field1, Field2, Field1&Field2 AS AvoidDuplicates

RESIDENT YourTable

WHERE Field1 > Field2 and NOT EXISTS(AvoidDuplicates, Field1&Field2);

DROP FIELD AvoidDuplicates;

Gysbert_Wassenaar

If those two fields in one table the you can calculate this easily in the script. Since you don't want to use a resident load you can store that table in a qvd, drop the table, load the data again from the qvd and calculate a new field to filter on:

Binary \\myserver\data\myqvwdoc.qvw;

Store MyTable into MyTable.qvd (qvd);

Drop MyTable;

MyTable:

LOAD

     *, If(Field1>Field2,1,0) as f_Field1IsLargerThenField2

FROM

     MyTable.qvd (qvd)

     ;


talk is cheap, supply exceeds demand
julioarriaga
Creator II
Creator II
Author

I appreciate your  prompt reply. Thank you

julioarriaga
Creator II
Creator II
Author

Thank you. That's what I wanted!