Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have two fields Year, Month in my data, my requirement is to add last two months to next year (Means my year will start from November).Now i want to filter the data based on Year field. For Ex : Year is 2013 and Month is 11 then it should take Year is 2014 and Month is 1,Year is 2012 and Month is 6 then it should take Year is 2014 and Month is 8.
I did it but when i filter the data i'm getting problem suppose Year is 2013 and Month is 11 If I add the Year filter as 2014 this row also should come.
I have added sample QVW also, Could you please anyone can take a look into this?
Thanks,
Chiru
LOAD
*,
IF (Month + 2 > 12, MakeDate(Year+1,Month+2-12),MakeDate(Year,Month+2)) as FP
Resident Tab1;
And the the file.
Hi Estrada,
Thanks for Your Reply.
But i want filter the data based on year For Ex : year is 2013 and month is 11, If i put filter Year =2014 then this record also should come under 2014.
Could you please help me on this?
Thanks,
Chiru
the latter is the only one table loaded in memory. Can you explain what behavior you want to achieve with the list boxes in the document: List boxes (Year), (Month) and (FP) those are the only ones you created in the document. explain please.
Hi,
Arrive a Fiscal calendar in your datamodel, check this link
Fiscal and Standard Calendar generation
Regards,
Jagan.
Tab1:
LOAD * Inline [
Year,Month,Price
2013,2,200
2013,3,300
2013,4,320
2012,6,230
2012,4,240
2012,5,600
2012,10,500
2013,10,200
2013,11,400
2014,9,900
];
finalresult:
LOAD
*,
IF (Month + 2 > 12, MakeDate(Year+1,Month+2-12),MakeDate(Year,Month+2)) as FP
Resident Tab1;
outer join
load year(FP) as Year ,
FP
resident finalresult;
drop table Tab1;