All in Tableau Dates

A student in one of my Tableau classes recently told me they were searching for a solution to one of their problems and came across my blog post Month to Date vs. Previous Month to Date in Tableau. Score!

I asked if it solved his problem and he mentioned that his use case was slightly different. Instead of answering the question, “How do month to date sales compare to previous month to date?” he was trying to answer, “How do month to date sales compare to month to date sales for each month from the past year?”

Tableau is optimized to perform date comparisons and calculations relative to a standard calendar. If your organization’s year starts on the first of a month other than January, Tableau can still handle that relatively well. The flexibility breaks down when the calendar year doesn't start on the first of the month and the comparison periods (e.g. semester or trimester) don't align with Tableau's pre-built periods (quarters, months, weeks).

Sometimes, when analyzing your business, you want to know how values month to date compare to this same point last month. We wrote a post about how to write these calculations in Tableau a while ago, but we’ve updated our methods and have some simpler formulas now! Check out the video below to learn the simplest way to write Month to Date and Previous Month to Date formulas.