Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Instead of firstsortedvlue there is any other way to get the max date of the key?
Hi
try this
Product
Max(Fieldname) as maxdate
from Source
---------- Group by Product;
Note: after group by write all fields.
Regards
Mahesh
Hi Try this
T1:
LOAD
PRODUCT,
SALES,
DATE
FROM
New Microsoft Excel Worksheet.xlsx]
(ooxml, embedded labels, table is Sheet1) ;
let Vpeek=peek('DATE',0,'T1');
Regards,
Mahesh
Hello Manoranjan
May be this helps you:
Table1:
Load ID, date from source;
Table2: Load max (date) as maxdate;
Resident Table1;
Let MAXDATE= peek('maxdate',0,Table2 );
Thanks & Regards
Chintan Gala
Another option could be
S:
load * inline [
key, date
1, 01/01/2016
1, 01/01/2015
1, 01/01/2014
2, 01/02/2010
2, 01/02/2016
3, 01/03/2016
];
// join order by key and date desc,
// keep only the first key (max date)
left join (S)
load key, date as maxdate
Resident S
where key <> Peek('key')
order by key, date desc;
Hi,
pls try this, parameter vMD will be filled with the highest date presuming that date is a daynumber (like 40365)
//Determine highest Date
MD: NoConcatenate
LOAD Max(Date) as MD;
LOAD FieldValue('Date', recno()) as Date
AUTOGENERATE FieldValueCount('Date');
let vMD = peek('MD',0,'MD');
good luck!
HtH
P
Hi Chintan,
the fieldvalue way is much more performant especially with large tables.
Try is out and you will see.
Cheers
F.