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: 
tsachdev421
Contributor II
Contributor II

Max date

I want to update all the rows in date column with Max date 

Labels (1)
5 Replies
durgesh22
Creator
Creator

@tsachdev421 

 

try below code

 

Temp1:

load * Inline [
Name, Date
John,
Kim,19/02/2021
Rick,
Marin,
Oscar,12/02/2021
];
NoConcatenate
Temp2:
load Date(Max(Date#(Date,'DD/MM/YYYY')),'MM/DD/YYYY') as NDate Resident Temp1 ;
//drop Table Temp1;
let maxdt=peek('NDate',0,'Temp2');
trace $(maxdt);
Final:
load Name,'$(maxdt)' as Date11 Resident Temp1;
drop Table Temp1,Temp2;

 

Thanks

durgesh22
Creator
Creator

if you are trying to achieve this in Table chart then try below.

Date(Max(total Date#(Date,'DD/MM/YYYY')),'DD/MM/YYYY')

tsachdev421
Contributor II
Contributor II
Author

This is not working. Giving null in all the rows.

Aditya_Chitale
Specialist
Specialist

@tsachdev421 

Try this:

test1:

LOAD
Name,
Date("Date",'DD/MM/YYYY') as Date2,
'1' as Flag
FROM [...]


left join (test1)

 

test2:

load
Flag,
max(Date(Date2,'DD/MM/YYYY')) as Date
Resident test1
group by Flag;


Drop field Date2 from test1;

 

Regards,

Aditya

vinieme12
Champion III
Champion III

temp:

load Name,Date#(Date,'DD/MM/YYYY') as DateCol Inline [
Name,Date
John,
Kim,19/02/2021
Rick,
Marin,
Oscar,12/02/2021
];

left join(temp)
LOAD
date(max(FieldValue('DateCol', recno()))) as maxdate
AUTOGENERATE FieldValueCount('DateCol');

drop field DateCol;
rename field maxdate to DateCol;

exit Script;

 

qlikCommunity.PNG

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.