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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
farolito20
Contributor III
Contributor III

Load if

How Can I make this LOAD

LOAD

     MostRecent

Resident DimOld

Where exists (Checksum2, Checksum) and t_bpid = $(vCustomerNumber);

IF MostRecent=1 then

     LOAD

  t_bpid,

                               t_nama,

                               t_ccur,

                              ValidFrom,

                              ValidTill,

                              Checksum,

                              MostRecent

       Resident DimOld;

ELSEIF m=0 then

    LOAD

                              t_bpid,

                               t_nama,

                               t_ccur,

                              date(now()) as ValidFrom,

                              Timestamp#('31-12-2099 08:00:00','DD-MM-YYYY hh:mm:ss')          as ValidTill,

                               //date(now())                    as          ValidTill,

                              Checksum,

                              1 as MostRecent

Resident DimOld;

ENDIF

I need to use the MostRecent value, and then compare if is 1 or 0

18 Replies
chematos
Specialist II
Specialist II

let rows = NoofRows(TableName);

farolito20
Contributor III
Contributor III
Author

How load just the last row?

chematos
Specialist II
Specialist II

add this field to your table:

Table:

Load *,

RowNo() as RowNumber

from whereever;

let rows= noofrows(Table);

Load *

resident table

where RowNo = $(rows);

farolito20
Contributor III
Contributor III
Author

In the last where, missing () in RowNo?

chematos
Specialist II
Specialist II

Load *

resident table

where RowNumber = $(rows);

farolito20
Contributor III
Contributor III
Author

I have an errorimage3.jpg

chematos
Specialist II
Specialist II

let rows= noofrows(Table);

What's the value of 'rows' variable??

farolito20
Contributor III
Contributor III
Author

The variable don't save anything.

I can solve my problem to first 1 load and put order by ValidTill desc and this show me the last row

chematos
Specialist II
Specialist II

let rows= noofrows('Table'); // may be you need to use simple quotes ...