Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to show previous month sales.
i my calender i have two month, FMonth and Month
In my whole application i am following FMonth and it is working well.
Previous month i am calcilating as
variable= Max(FMonth-1)
calculating expression is
=sum({<FMonth = {$(variable)}>}sales
but it is giving me error,as value 0.
pls help me .........
Try this
=sum({<FMonth = {'=$(=variable)'}>}sales
or
sum({<FMonth = {"=$(=variable)"}>}sales
sum({<FMonth = {'=$(variable)'}>}sales)
use single quote.
and close opening bracket at end.
It will work.
-- Regards,
Vishal Waghole
when i am doin MAX(FMonth) it is giving me Aug
but when i am Doing max(FMonth-1) it is giving me 4 if max month aug is selected,
i thing instead of 4 it should give me july
Caluculate your previous month as like
=AddMonths(Max(FMonth),-1)
Hope this will give you result as Jul
-- Regards,
Vishal Waghole
This depends on how you create the field in the script. Generally, it is easier to calculate the previous month from date field. Try to redefine your variable like:
variable= Month(AddMonths(Max(Datefield), -1))
And then your expression =sum({<FMonth = {'$(variable)'}>}sales) should work.