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
Thanks a lot i will try and tell i hope it works
Hi
if you have Month field please try this expression
Sum({<Month= {"$(=Month(Max(Date))-1 )"}>}Sales)
hope this help you
Thanks & Regards
Ahmar Ansari
this is one is fine but instead of today i want last date in my records. for that max (Date) we can use ....but here in this variable how can use max (Date)
Hi Vijay,
Try this expression for last date if your Filter is Order Date
=sum({<OrderDate={'$(=monthend(Addmonths(OrderDate,-1)))'}>}TotalDue)
You mean, like:
vRecentMostMonthEnd =If(max(Floor(Date))=Floor(Monthend(Today())), Date(Max(Date)), MonthEnd(Today(),-1))
ya but can we write the condition without today() function.
Certainly, I just missed that. May be:
vRecentMostMonthEnd =If(max(Floor(Date))=Floor(Monthend(Today())),Date(Max(Date)), MonthEnd(Max(Date),-1))
=sum({<OrderDate={'$(=monthend(Addmonths(OrderDate,-1)))'}>}TotalDue)
This works for you using Order Date List box
ya correct one when i take that if expression in text area it's working fine giving correct date...but when i use in set expression showing 0.000 value
vRecentMonth=date(If(max(Floor(StockClosing_DateNum))=Floor(Monthend(num(Today()))),num(Max(StockClosing_DateNum)), MonthEnd(Max(StockClosing_DateNum),-1)))
in expression =sum({<BILLDATE={'$(vRecentMostMonth)'}>}StockClosing_GROSSWEIGHT)
Stockclosing_date is floor(BILLDATE)
BILLDATE is normal date field
Thanks Mayuresh the condition is correct but for my expression it's giving zero value....
i am taken your condition in text area it's working fine with small change '=max(MonthEnd(Addmonths(Date,-1)))'
when i use for my measure it's giving zero value...