Skip to main content

App Development

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

Announcements
Qlik Cloud Maintenance is scheduled between March 27-30. Visit Qlik Cloud Status page for more details.
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
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

?