Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi May be i am asking a silly question. I would like to flag last date in each month either using peek function or in any other way is script.
load Max([Stock Plan Date]) as LastDayMonth, ITEM_ID
Group By ITEM_ID, Year([Stock Plan Date]), Month([Stock Plan Date]);
In this script we have to include month and Year as well otherwise , it will give us the maximum date for each Item...Hope this is correct.
sorry forgot to attach the QVW file.
if(MonthEnd([Stock Plan Date]) = [Stock Plan Date], 'Y', 'N') as MonthEndFlag
Hi Kozins,
Looks like monthend will give me exact month end i guess. I applied above script, it is N for all the dates. In my data my month end would be sometimes 28th or 29 th, 27 as well. not necessarily 30 or 31....
something lik this:
App:
LOAD [Stock Plan Date] as date,
AVAIL_INV_QTY,
ITEM_ID
FROM
(biff, embedded labels, table is Sheet1$);
inner join
load Max([Stock Plan Date]) as LastDayMonth, ITEM_ID
Group By ITEM_ID, Year([Stock Plan Date]), Month([Stock Plan Date]);
App2:
Load *,
if ([Stock Plan Date] = LastDayMonth, 'Y', 'M') as LastDayFlag
Resident App;
Drop Table app;
i was just about to paste the solution. Thanks for your help..i got the same idea..
load Max([Stock Plan Date]) as LastDayMonth, ITEM_ID
Group By ITEM_ID, Year([Stock Plan Date]), Month([Stock Plan Date]);
In this script we have to include month and Year as well otherwise , it will give us the maximum date for each Item...Hope this is correct.