Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I am trying to calculate sales for the previous year. I have made a variable as i thought it would be easier. When i make a selection i.e a month (feb 2017), i want this new measure to calculate the year before(Feb2016).
Currently it just shows the same sales as the selection made.
I have a date field,"Date1" and sales field "NetValue".
vLY= Year=,Month=,Week=,Day=,Date=,[Date1]={">=$(=date(addmonths($(vMinDate),-12)))<=$(=date(floor(addmonths(vMaxDate),-12))))"}
expression used = sum({<$(vLY)>}NetValue)
I have also removed "Year=,Month=,Week=,Day=" from the variable and it makes no difference.
It still shows the same results as " sum(NetValue)"
is the variable wrong?
Thankyou!
try using this for showing Sales of previous year in set analysis
{<MonthID=,Month=,Year={'$(=Max(Year)-1)'} ,Date={"<=$(=Max(Date))"}
Hi Rohan
Like this?
sum({<MonthID=,Month=,Year={'$(=Max(Year)-1)'} ,Date={"<=$(=Max(Date))"}NetValue)
MonthID is not a field and it does not work thankyou for trying
sum({<Month=,Year={'$(=Max(Year)-1)'} ,Date={"<=$(=Max(Date))"}NetValue)
dnt use MonthID in exclusion hope this will work
Hi Rohan
It is still not working. When i used the variable it would actully return a value