Last year calculation total sales


Hi, I need to be able to calculate sales from the previous year but it’s marking this error for me, I suppose it’s because of the type of value I have in the current year

Hi @Geral

At the looks of it your arithmetic expression of -1 with a date field may not work. You may need to use addDateTime for that.

Please refer to the following artcile that provides you detailed info on computing Period Over Period kind of computations.

Regards,
Giri

HI @Geral
error msg is telling the same. {Year} is a date and {Most recent year} is a number. you cant compare date and number.
Try: ifelse(extract('YYYY', {Year}) = {Most recent year}-1,{Gross Sjipped GMS},0)
BR

Hi @Geral,
It’s been awhile since we last heard from you, did you have any additional questions regarding your initial post?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi @Geral,
Since we haven’t heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!