Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to do a max month, by year.
but how can i do that in LOAD?
It should return only 2011 DEC and 2012 FEB.
sounds simple, but i'm stuck...
2011 MAR
2011 DEC
2012 JAN
2012 FEB
Thanks.
NPUT:
LOAD Date#(FIELD,'YYYY MMM') as YearMonth INLINE [
FIELD
2011 MAR
2011 DEC
2012 JAN
2012 FEB
];
LOAD FirstValue(YearMonth) as MaxYearMonth
Resident INPUT
group by year(YearMonth)
order by YearMonth desc;
try this:
T1:
load * Inline
[
year,month
2011,MAR
2011,DEC
2012,JAN
2012,FEB
];
tab2:
LOAD
year,
max(date(date#(month,'MMM'),'MMM'))
Resident T1
Group By year;