Divya i am not sure about the fix but i have few questions which might help you. in the excel you provided there is no date part at all and i did't understand what date you are trying to extract. since Qlikview treats month with dual values we can assume the case that it take the number of the month in the right hand part but in left hand it is not getting the same sort of value i believe. i think you can check on month instead of date.
Load *,if(Date(Month,'MM-DD-YYYY')>=Date(Max(Month(Month)),'MM-DD-YYYY'),'Yes','N0') as Flag, Month(Month) as LogicMonth, Year(Month) as Logicyear resident Tab;
The reason, why this Load fails, is the missing group by statement.
Using an aggregation function (here max()), you have to group by all fields used without aggregation functions in the same load.
Load *,if(Date(Month,'MM-DD-YYYY')>=Date(Max(Month(Month)),'MM-DD-YYYY'),'Yes','N0') as Flag, Month(Month) as LogicMonth, Year(Month) as Logicyear Resident Tab Group By Amount, Month;
at least will load without error, the question remains, what you would like to achieve, because comparing dates with numerical values like 41275 (representing 1/1/2013) with months (having values from 1 to 12) does not make much sense. The flag will always be 'yes' because all relevant date values are greater than month values.
hope this helps
Thanks for your Helpful information.I have used the same code in my Application.I am getting Invalid expression Error.Please suggest me. .
LOAD *,if(Date(cmdbci_Date1,'DD-MM-YYYY')>=Date(Max(Month(cmdbci_Date1)),'DD-MM-YYYY'),'Yes','N0') as Flag,
Month(cmdbci_sys_created_on) as CIMonth,
Year(cmdbci_sys_created_on) as Year
Group by Tempcmdbci_name,cmdbci_Date1;
Thanks in Advance