3 Replies Latest reply: Aug 14, 2015 10:53 AM by Maximiliano Velez RSS

    Using a custom measure in simple set analysis



      I'm pretty new to Qlik Sense, I've been playing around with set analysis for a while but now I'm stuck on something that should be easy to solve...


      I have sales data sample where my time reference is "OrderDate"


      What I'm looking for is to get the sum of  sales for the most recent available day which is 01/06/2008 ; I consider this day as my 'today'


      so I write the following: sum({$<OrderDate={"01/06/2008"}>}Sales)... this works I get 50,27K in Sales that day


      No what I'm trying to do is to create a measure that I can reuse to simulate a today date so it can be reusable


      so I created a measure called 'vToday' =  Date('01/06/2008','DD/MM/YYYY')


      My issue is that when I write the following expressions sum({$<OrderDate={vToday}>}Sales) I get Sales = 0 , which is not correct


      What am I doing wrong here?