Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to make a month on month comparison(i.e Mar 2012 - Feb 2012, Jan 2012 - Dec 2011 data on pivot table, this is the code on my dimension to extrapolate the value on the current month, therefore Month_Year have to be on the dimension
=IF ( Date > AddMonths ( ( var_EndDate ) , (-var_PeriodInYears * 12) ) ,
if( MonthEnd(Date) <> var_EndDate
AND MonthEnd(Date) = MonthEnd(var_EndDate)
, '*' & Month_Year, Month_Year) )
This is my code for my expression
=if( MonthEnd ( MAX( Date ) ) <> var_EndDate AND MonthEnd( MAX ( Date ) ) = MonthEnd( var_EndDate ) ,
(
( sum({$<Year = {$(v_ThisYear)}, Loading = {'ID*'}>} TEU) - sum({$<Year = {$(v_ThisYear)},Loading = {'ID*'}>} TEU) )
/ Day( var_EndDate )) * Day(MonthEnd(MAX ( Date )) * 100
)
,
((sum({$<Year = {$(v_ThisYear)},Loading = {'ID*'}>} TEU) -sum({$<Year = {$(v_ThisYear)},Loading = {'ID*'}>} TEU)))
I am thinking of using this code to make MOM comparison but it is not working
AddMonths(Date,-1)
Is there any code that works something like this?