2 Replies Latest reply: Dec 6, 2012 7:17 AM by Staffan Johansson RSS

    Set expression compare

    Staffan Johansson

      Hi, Here is my problem:


      Selected Year 2011.


      I have a customer with no sale in Dec 2011, YTD LY (2010) will only show me sale to Nov, ihave sale in dec 2010.



      My expression for YTD LY says <=max(Month) but in this case max month will be Nov.

      sum({$<Year = {$(=only(Year)-1)}, Month = {"<=$(=max(Month))"}>}Invoiced


      Qlikview gives me the "correct" values based on the expression, but how should i solve this issue?

      The report is dynamic so when i choose for ex okt, okt 2010 will be higlighted in YTD LY.


      sum({$<Year = {$(=only(Year)-1)}, Month = {"<=$(=max({1} Month))"}>}Invoiced)

      will give me the correct value, but will be static and show me sale Jan-Dec no matter what.