Forum Discussion

igancedo's avatar
igancedo
Regular Visitor
4 years ago
Solved

Dynamic MAX date

Hi everyone,   I need to limit the data that is being shown in a graph by following this criteria:   If today is before the 15th of the current month, show up to the last day of two months ago ...
  • tamerj1's avatar
    4 years ago

    igancedo 

    You use

    VAR EndOfLastMonth =
    EOMONTH ( TODAY (), -1 )
    VAREndOfTwoMonthsAgo =
    EOMONTH ( TODAY (), -2 )
    VArCriteriaDate =
    IF ( DAY ( TODAY () ) >= 15, EndOfLastMonth, EndOfTwoMonthsAgo )