Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limit Records Loaded

I have several transaction tables with a DATE field on them all linked to a CUSTOMER table via a CUSTOMER_ID.

In my CUSTOMER table I also have a field ACTIVE_DATE

When I load my data to Qlik Sense I want to only load records from the transaction tables where the DATE > ACTIVE_DATE for the consultant linked to the transaction.

In SQL this would be:

SELECT

     TRANSACTION_ID, TRANSACTION_DATE, TRANSACTION_AMT

FROM

     TRANSACTION T

INNER JOIN

     CUSTOMER C on C.CUSTOMER_ID=T.CUSTOMER_ID

WHERE

     T.TRANSACTION_DATE > C.CUSTOMER_DATE


How do I write this in a Qlik Sense load script?

5 Replies
sunny_talwar

Are you loading data into your Qlik Sense using SQL? If you are, then you can use the below query and it would only load data which meets your condition

Not applicable
Author

I am new to Qlik Sense and all I know how to do is load single csv files in using the LOAD statement.

I have no idea how to incorporate SQL joining queries into the load script. Can you do that?

sunny_talwar

All you need to do is this:

TableName:

LOAD *;

SQL SELECT

     TRANSACTION_ID, TRANSACTION_DATE, TRANSACTION_AMT

FROM

     TRANSACTION T

INNER JOIN

     CUSTOMER C on C.CUSTOMER_ID=T.CUSTOMER_ID

WHERE

     T.TRANSACTION_DATE > C.CUSTOMER_DATE;

You can add a preceding load here, but if you don't want to do any manipulation in Qlik Sense, then you don't have to put it there

TableName:

SQL SELECT

     TRANSACTION_ID, TRANSACTION_DATE, TRANSACTION_AMT

FROM

     TRANSACTION T

INNER JOIN

     CUSTOMER C on C.CUSTOMER_ID=T.CUSTOMER_ID

WHERE

     T.TRANSACTION_DATE > C.CUSTOMER_DATE;

Not applicable
Author

Sunny,

I'm new to QlikSense, but he will need to setup an ODBC connect as well, correct? Just like we do in QlikView.

Stan

sunny_talwar

Yes, we def. need that as well . Thanks for pointing that out