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
Try this expression =sum({<BILLDATE={'$(=monthend(Addmonths(Max(BILLDATE),-1)))'}>}StockClosing_GROSSWEIGHT)
This works for me
Could you post a sample qvw?
Hi
Try like this
=sum({<BILLDATE={'$(=vRecentMonth)'}>}StockClosing_GROSSWEIGHT)
Check both vRecentMostMonth is same date format like Bill Date.
If it not there,
vRecentMonth=date(If(max(Floor(StockClosing_DateNum))=Floor(Monthend(num(Today()))),num(Max(StockClosing_DateNum)), MonthEnd(Max(StockClosing_DateNum),-1)),'YourBillDateFormat')
Mostly when something is working in text box but not working in straight table/chart means there could be a granularity mismatch between dimension selected and dimension used in expression. If you can post sample data/app, that will help.
Thanks a lot tresesco i got the solution
in expression alone
=sum({1<NumDate ={'$(=floor(num(max(MonthEnd(AddMonths(NumDate,-1))))))'} >}SCMSTOCK_GROSSWEIGHT)
thanks alot to all
i got the solution
=sum({1<NumDate ={'$(=floor(num(max(MonthEnd(AddMonths(NumDate,-1))))))'} >}SCMSTOCK_GROSSWEIGHT)
This condition will give last month last for selected month
=floor(num(max(MonthEnd(AddMonths(NumDate,-1)))))