In this video we learn in Tableau Desktop how a simple calculated field can create a dimension, that can be applied to a charts colors and automatically highlight the past, present and future dates. This is a simple but powerful technique, enabling the viewers to infer that all of the data points should not be treated equally e.g. can’t affect the past, can affect the present, the future results haven’t happened yet. Otherwise your viewers might make incorrect assumptions about your charts, which can never work out well for anyone.

Copy and paste this equation into a calculated field in Tableau to create a new dimension:

IF DATEDIFF("quarter",[Date],TODAY()) > 0 THEN "Past"
    ELSEIF DATEDIFF("quarter",[Date],TODAY()) = 0 then "Present"
    ELSEIF DATEDIFF("quarter",[Date],TODAY()) < 0 then "Future"

Do you have a different technique to achieve this, a good example of it in action or if this helped you out somehow? Let me know in the comments below.


Please enter your comment!
Please enter your name here