5 Replies Latest reply: Jan 8, 2018 11:51 AM by David Dumas RSS

    Creating a (true) YTD measure

    David Dumas

      I wanted to share something in a post from Sunny Talwar that allowed me to create a true YTD measure which ignores selections (which is what you need) that users make on any date selections except for year.  I have not seen this anywhere in the docs, or books - I have many.  This indeed works.  Thanks Sunny!:


      If there are any other solutions to this, I would love to see them.


      Sum({<PeriodId = {"<= $(=Max({<Quarter,Month>}PeriodId))"},Year={"$(=Max({<Quarter,Month>}Year))"},Month=>}Sales)

      Adding the {<Month>} modifiers "fixes"  what I would call a bug in set analysis.  I love Qlik, but creating time intelligence functions really should not be that hard