1 Reply Latest reply: Aug 20, 2015 2:48 AM by Jonathan Dienst RSS

    Mtd,Ytd

    rgv rand

      Hi All,

       

      I am working on ytd,mtd calcuation in script level.

       

      Below is my script.

      I am getting the day values which are correct .But my ytd ,mtd are wrong values.Please correct if my formula is wrong.

       

      Load *, 'YTD' as TimeGranule

      Resident Cal where Date >=YearStart(TempDate) and Date<=TempDate;

       

      Load *, 'MTD' as TimeGranule

      Resident Cal where Date >= MonthStart(TempDate) and Date <= TempDate;

       

      Load * , 'Day' as TimeGranule

      Resident Cal

      where Date=TempDate;

       

       

      Thanks