4 Replies Latest reply: Aug 2, 2017 10:37 AM by Simone Trabattoni RSS

    Set Analysis with date

    Simone Trabattoni

      Hi community,

      today I have a problem with set analysis and dates. My goal to reach is to have a sum of a quantity in the month of today. Here what I have done:

       

      Sum({$<TypeOfQuantity={"A"},[MonthName]={"=month(today())"}>}Quantity)

       

      I've thought several solutions, but none of them worked.

      My variable called MonthName is something like:

       

      jan

      feb

      mar

      ...

      dec

       

      and in the setting of the script the name of the months are equal, i.e.:

       

      jan

      feb

      mar

      ...

      dec

       

      Quite weird that if I put a constant in place of  month(today()), it works!

      So I tried

      Sum({$<TypeOfQuantity={"A"},[MonthName]={"=month(date(today()))"}>}Quantity)

      Sum({$<TypeOfQuantity={"A"},[MonthName]={"=monthname(today())"}>}Quantity)

       

      But none of them worked.

      How can I do it?