1 comment

  • Avatar
    Megan Moss

    I apologize in advance for any funky formatting or for missed/extra parentheses, as I’m on my phone and it’s hard to type.

    For current YTD, create a custom column called IsYTD and use the formula:
    CASE WHEN ((GETYEAR(your date field) = GETYEAR(NOW()))
    AND (GETMONTH(your date field) <= GETMONTH(NOW()))
    AND (GETDAY(your date field) <= GETDAY(NOW())))) THEN 1
    ELSE 0

    You can then use the column IsYTD as a flag selecting 1 for records that are YTD. Select both (or toggle the filter off) for whole year.

    This can also be used to do all records YTD (regardless of year) for example, bar graph comparing records from Jan 1-May 2nd for all years, by removing the GETYEAR section of the statement

    Comment actions Permalink

Please sign in to leave a comment.