3 Replies Latest reply: Feb 3, 2016 6:00 PM by Sunny Talwar RSS

    Calculated Dimension to show only full quarters

    Frank Casella


      I'm creating some trending charts, and want to ensure the current quarter is not displayed unless it is the third month of the quarter.  I had been using the system field ReloadTime() in a calculated dimension to do this:


      if([Quarter Name]<QuarterName(ReloadTime()),[Quarter Name])


      I'm trying to move away from ReloadTime(), as while the application is generally loaded during the month following the latest data month, it can sometimes be delayed.  As an example, in circumstances where February data isn't loaded until April, the existing calculated dimension would show the [Quarter Name] with only two months of data.


      I've tried using AddMonths(Max([Month Name]),1) in place of ReloadTime().


      When I test the expression in a textbox, it returns the value I'm looking for...

      QuarterName(AddMonths(Max([Month Name]),1)) returns Jan-Mar 2016


      When I put it in the dimension, however...

      if([Quarter Name]<QuarterName(AddMonths(Max([Month Name]),1)),[Quarter Name])


      it gives me an "error in calculated expression".


      I've doublechecked that I'm using the same expression that returns the valid text value...any idea what I'm doing wrong or is there a better way?