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.

srikanthsri1
Not applicable

Load from table from excel where date = max(date)

Hi All,

        I have a set of excel data file genreated for every week ..i'm using a for loop to pull everything in Qlikview

now the issue is from the latest file i need to pull some additional data ..

so i'm giving some conditon like if (data = max(date) after load statement and in the where clause

how to write a  condition  for something like this

plz help ..if my question doesn't make  sense please let me know so that i can comeup with a better  way of presenting the same question

Thanks

Have a woderful weekend

2 Replies
srikanthsri1
Not applicable

Re: Load from table from excel where date = max(date)

 

FOR

EACH File in the fileist ('path'&* &'string')

 

WorkbooksTemp:

LOAD

 

right

(SubField('$(File)','.',1),4) as Year,
left(SubField('$(File)','Act_',2),3) as Month,
'$(File)'
AS WorkbookName

Autogenerate 1;

next

This is the script for loading all the excel files in a folder

using year and month i can create a date field  but

  i want to use a where conditon to pull only one latest  file where date is maximum

shree909
Not applicable

Re: Load from table from excel where date = max(date)

Hi

First Load everything into the QVD ..

From that qvd take the  max date with the resident load  and store that as an qvd...