Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi guys i want to get the latest month end date sales only that means, if present month is march 8 in that case i need to get feb 29 sales.
Can any one help how to achieve that in expression sum(Sales)
Thanks in advance!
Vijay
Hi,
Use this expression.
Sum({<Date = {"$(=monthend(addmonths(Max(Date),-1)))"}>}Sales)
Regards,
Kaushik Solanki
hi
please try this exp..
Sum({<Date = {"$(=addmonths(monthend(Max(Date))))"}>}LineSalesAmount)
Hi kaushik,
your expression will give march 31, In my case , if march 31 still not there then it should take feb 29 date.
Thanks
Try this for the last months complete sale on last date.
=Monthend( AddMonths( Max(Today() ), -1) )
Regards,
Anand
Hi nagi reddy the Addmonths(,) should be like this wrong syntax for add months.
Thanks for reply
Hi,
My expression will give Feb 29 when your max(date) is 8th March. This is what you have asked in question, correct me If I am Wrong.
Sum({<Date = {"$(=monthend(addmonths(Max(Date),-1)))"}>}Sales)
Regards,
Kaushik Solanki
Define a variable like:
vRecentMostMonthEnd =If(Today()=Floor(Monthend(Today())), Today(), MonthEnd(Today(),-1))
Then expression like:
Sum({<Date={'$(vRecentMostMonthEnd)'}>} Sales)
Edit: corrected a brace
yes this is correct to get last month last date. in future i get march 31st also at that also it will give only last month last date.
i need a condition if last date is not there in current month than take last month last date....
thanks anand
ya that only i needed buy ur set condition is not working.
Thanks