Tableau Tips: Exclude Current Month and Year

Tableau Tips: Exclude Current Month and Year

One frustration many Tableau users face on a regular basis is graphing transaction records as they occur by date.  When comparing a graphical representation of transactions for a month through time, the current month is rarely a useful component.  

When connecting to a consumable data source in Tableau information is included which detracts from the impact of the story trying to be told.  The best way to eliminate this is via a simple programmatic custom field. 

Adding this custom field to the filter and setting to "F" excludes the current months data, providing a cleaner visualation.  

To impliment this in your own dashboard, simply copy the code below into your own calculated field and replace the [Date] field.  

    DATEPART('month',[Date]) >= DATEPART('month',TODAY())
    DATEPART('year',[Date]) >= DATEPART('year',TODAY())
THEN "Current and Future"

Happy dashboarding!

Tableau Tips: Combine Strings to Create A Date Field

Sending PDF Tableau Dashboards Automatically Through Your Organization