1 Reply Latest reply: Dec 28, 2015 3:01 AM by Astrid Lammerts RSS

    YeartoDate PY with 53 weeks

      Hi all,


      Our definition is that for YearToDate (YTD) we take max 52 weeks. Normally we defined PastYear YTD (PYYTD) as Commercialyear -1 and took the same (max) week. Now we've changed our formula and it works fine directly in the expression. But we work with include variable files (.txt). If I place the variable in the file it doesn't work anymore. THe only change to the expression is that in the variable we need to use the ALT codes.


      Can you please help me?


      LET vNetSalesPYYTD = 'sum({<CommercialYear=,Week=,WeekSerial={">='&CHR(36)&'(=max(WeekSerial-if(Week='53', 52, 52+Week-1))),<='&CHR(36)&'(=max(WeekSerial-52))"}>}Sales)';


      Best regards,