Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

YoY calculation

Hi,

I am using year as date field. I want to calculate previous year's value associated with some dimension.

I am using this expression

if(Year='2014',Sum({<YearField = {'$(=Year(Today()))'}>} sales),Sum({<YearField = {'$(=Year(Today())-1)'}>} sales))

I have years starting from 2014 that is why if .

But, i am still getting current year values .

Please let me know what corrections to make.

However, to calculate it for current year using

Sum({<YearField = {'$(=Year(Today()))'}>} TAM_VALUE)  is giving correct results.

lech_miszkiewicz

stevedark

mto

20 Replies
Anonymous
Not applicable
Author

if(Year='2014',Sum({<YearField = {'$(=Year(Today()))'}>} sales),Sum({<YearField = {'$(=Year(Today())-1)'}>} sales))