Discussion board where members can get started with Qlik Sense.
Assuming you want to calculate SUM(Amount) and that your date field is named Date and that you have other calendar fields such as YearMonth, Month, Week and Year.
YTD
=count({<
YearMonth,
Month,
Week,
Year,
Date={">=$(=YearStart(today())) <=$(=monthend(max(Date)))"}
>} Date)
MAT
=count({<
YearMonth,
Year,
Month,
Week,
Date={">$(=addyears(monthend(max(Date)),-1)) <=$(=monthend(max(Date)))"}
>} Date)
YTD:
Sum({<Year=,Month=,OrderDate ={"$(='>=' & Date(YearStart(Max(OrderDate)),'MM/DD/YYYY') & '<=' & Date(Max(OrderDate),'MM/DD/YYYY'))"}>}Sales)
This should work
Try the attached app.