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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

selecting maximun date from multiple dates

Hello I need to find the maximum date field from multiple date fields

i need to put this in my script.

so for one order there will be different dates as it moves forward

i need to create one column which shows the latest date at that particular time.

  

orderdate1date2date3max(date)
11 1
112 2
11233

Please let me know how i can do it.

Thanks & Regards,

Jaya

4 Replies
swuehl
MVP
MVP

LOAD

     RangeMax(date1,date2,date3) as MaxDate

Anil_Babu_Samineni

May be

RangeMax(date1, date2, date3)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vvvvvvizard
Partner - Specialist
Partner - Specialist

=Max{1} Date

ahaahaaha
Partner - Master
Partner - Master

Hi Jaya,

I find it difficult to judge, why need place this in the script. But if it is necessary, as an variant

Table1:

LOAD

RowNo() as ID,

*Inline

[order,date1,date2,date3

1,1,

1,1,2

1,1,2,3];

Table2:

CrossTable (Date,Vol,2)

LOAD

ID as ID1,

order as order1,

date1 as date11,

date2 as date22,

date3 AS date33

Resident Table1;

Table3:

LOAD

ID1,

Max(Vol) as MaxDate

Resident Table2

Group By ID1;

DROP Table Table2;

Left Join(Table1)

LOAD

ID1 as ID,

MaxDate

Resident Table3;

DROP Table Table3;

Result

1.jpg

If the calculation can be done on the level of chart, colleagues above suggest solution.

Regards,

Andrey