1 Reply Latest reply: Jan 5, 2012 8:22 PM by Karl Pover RSS

    QTD and QTD Previous Year Calcs

      Can anyone tell me why these expressions aren't working?



      sum(if([Date] = QuarterStart(Today())

      AND year(Date) = year(Today())



      Same Quarter Previous Year:

      sum(if(DayNumberOfYear([Date]) <= DayNumberOfYear(Today())

      AND [Date] = QuarterStart(Today())

      AND year(Date) = year(Today())-1



      And if anyone has an idea of what will work, I am all ears.

      I've been working on this forever it seems and can't figure it out. I need QTD values and same quarter last year values but can't seem to get it to work.



        • QTD and QTD Previous Year Calcs
          Karl Pover





          sum(if(Date>=QuarterStart(Today()) and Date<=QuarterEnd(Today()), Value))


          Since QuarterStart() and QuarterEnd() return a full date with year, you don't have to compare year.


          The same quarter previous year would be:


          sum(if(Date>=QuarterStart(Today(),-4) and Date<=QuarterEnd(Today(),-4), Value))