Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sharu055
Contributor III
Contributor III

YoY YTD comparison

Hi,

I am having two fields, Date & Money. having two years of data (2021,2022)

i want to make sum of Money for present year YTD in one column and Sum of Previous year same YTD as present year.

How to write he expression.. please help 

Labels (1)
1 Reply
BrunPierre
Master
Master

Sum({$<Date={"$(='>=' & Date(YearStart(Max(Date)), 'DD/MM/YYYY') & '<=' & Date(Max(Date), 'DD/MM/YYYY'))"},Year,Quarter,Month,Week>}Money)   // Present Year YTD

Sum({$<Date={">=$(=YearStart(Max(Date), -1))<=$(=AddYears(Max(Date), -1))"},Year,Quarter,Month,Week>}Money)   //Previous Year same period

?