Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to get Previous Month Value when i make a selection, but struggling to get it right?
E.g if i select May on a list box it must show me values for April.
like -1
i Tried:
=sum({<Dates={'>=$(=only(Dates)-2)<=$(=only(Dates))'}>}Sales)
and
=sum( {$<Year = {$(=Only(Year)-1)}>} Sales )
im i missing something in here?
Regards:
Thabiso
Hi SunIndia, yours it gives me current month Selected thou i need Previous month from that selected Month.
if on my listbox i select March, it must calculate for February.
Thanks
Try this expression:
=Sum({<Dates = {"$(='>=' & Date(AddMonths(MonthStart(Max(Dates)), -1), 'YYYY-MM-DD') & '<=' & Date(MonthEnd(Max(Dates)), 'YYYY-MM-DD'))"}, MonthDate = >}Sales)
Attaching the qvw for your review purposes.
Best,
Sunny