Discussion board where members can get started with QlikView.
it's kind of a miss or hit thing. sometimes it works and other times it doesn't.
I need to find values with latest date. I usually use this method, but it's too long. Any good suggestion to make my life easier? thanks
sql select distinct load_date from tbl1;
load max(load_date) as MaxDate
let vMaxD = peek('MaxDate', 0, 'P')
drop table P;
drop table P2;
sql select * from tbl1
where load_date ='$(vMaxD)';
Go to Solution.
sql select Max(load_date) from tbl1;
Hope this helps you.
Maybe just move the Max() into the first SQL statement?
sql select max(load_date) from tbl1;
let vMaxD = peek('load_date')
Oops - not sure why I didn't see Jagan's answer there already!