9 Replies Latest reply: Oct 23, 2015 9:45 AM by PAUL YEO RSS

    How to auto get LY_YTD not by manually turn on LY_YTD ?

    PAUL YEO

      Hi All

       

       

      I using load script create below field :-

      If([Reporting Code]>=100 and [Reporting Code]<=374,'eXP') as [eXP],

       

       

      I can make use of below expression to get yearly Amount :-

      Sum({<eXP={"eXP"}>}Amount)/1000

       

       

      I have load script for flag LY_YTD :-

      If(Num([TempDate]) >= $(vYearStartLY) and Num([TempDate]) < $(vMonthNowLY), -1, 0) As LY_YTD

       

      if I manually activate eXP and LY_YTD , i can get LY_YTD Amount = -678,468

       

       

      My Question is how to get LY_YTD by exopression ?

       

       

      I assume the expression is sone thing like below , how it not work :-

       

       

      sum(if(LY_YTD,Sum({<eXP={"eXP"}>}Amount)/1000))

       

       

      Paul