This content has been marked as final. Show 3 replies
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?