2 Replies Latest reply on Jan 14, 2019 11:21 AM by Daniel Lawrence

    Do not show current period for all time granularity

    Daniel Lawrence

      Hello all,

       

          I am looking to make a responsive formula for a line graph that chops off the current period.  Seems simple enough, but I want it to respond to what ever time period the user selects cycling through the Date hierarchy.

       

      So, if line graph is in Months it does not show the current month, if it is in quarters, it does not show the current quarter, etc....

       

      I am trying to use a very similar formula as was found in this thread, but I keep running into the problem of double booleans. 

       

      Specifically:

       

      IF

          MIN(DATEPART('dayofyear',[Date]))=MAX(DATEPART('dayofyear',[Date]))

          THEN

         Date < Today()

      END

       

      The intent here is for it to detect that the granularity is day and exclude today but the problem is that the THEN statement has a boolean which needs to be asserted to TRUE or FALSE as in a filter.

       

      I think this requires a neat, clever trick to work.  Unfortunately, I am neither neat or clever so I present this to you as a challenge.

       

      Good luck and thank you!