Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Qlik Cloud Maintenance is scheduled between March 27-30. Visit Qlik Cloud Status page for more details.
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

YoY YTD comparison


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
Specialist II
Specialist II

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