10 Replies Latest reply: May 5, 2017 3:35 AM by Sebastian Fagerlund RSS

    Combine Variable with condition

    Sebastian Fagerlund

      Hi,

      Want to see the rolling 52 weeks for sales on category X.

       

      Have the following variable and analysis. But how do i combine them?

       

      Set analysis:

      Sum({<Category = {'X'}>} Sales)

       

      Script:

      LET vR52 = '{<Year=,YearMonth=, Quarter=, Month=, Week=, Date =, DateNum = {">=$'&'(vSelectedDate364)<=$'&'(vSelectedDate)"}>}';

       

      Variables:

      vSelectedDate364:

      =num($(vSelectedDate)-363)

      vSelectedDate:

      =Max(DateNum)

       

      The variables and set analysis works, but can't figure out how to combine them..

       

      Have tried:

      Sum({<Category = {'X'},$(vR52)>} Sales)