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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
SatyaPaleti
Creator III
Creator III

How to get Maximum date in Load Script

Hi Friends,

Need a small help

I am having a field called Receipt date

I want to calculate Minimum Receipt Date only in script

I am using

Load

Min(Receipt Date) as Minimum Date

from xyz.qvd

But it is showing error

could any one of you help how to write this inn script level

Thank you,

Satya

20 Replies
Chanty4u
MVP
MVP

try dis

Load*,

Min(Date(Receipt Date)) as MinimumDate

from xyz.qvd

marcus_sommer

Could it be that your load-statement is missing a fileformat like: from xyz-qvd (qvd);

- Marcus

MK_QSL
MVP
MVP

Please post screenshot of your script...

Not applicable

Try this

Load

          Min(Date([Receipt Date])) AS ReceiptDate

From  xyz.qvd ;

Not applicable

Load

          Min(Date([Receipt Date]))     AS     ReceiptDate

From xyz.qvd ;

engishfaque
Specialist III
Specialist III

Dear Satya,

Can you share your .qvd file?

I think, you are facing error "invalid expression" due to aggregate function "Min()". Please load one more field and use group by clause.

Kind regards,

Ishfaque Ahmed

harsh44_bhatia
Creator
Creator

maxmindate:

load

DATE(min(FieldValue('dateField',RecNo()))) as minDate,

DATE(max(FieldValue('dateField',RecNo()))) as maxDate

AutoGenerate FieldValueCount('dateField');

this is also one of the way to get the minimum or max date

vinod2086
Creator II
Creator II

Hi,

try this one may be it will work

=Aggr(Max([Column_name]),ID)

PradeepReddy
Specialist II
Specialist II

while using the aggregation functions, you have to  use group clause.

Load Key_Field,

Min(Receipt Date) as Minimum_Date

from xyz.qvd

group by key_Field;