Month to Date vs. Previous Month to Date in Tableau (Video)

By: Eric Parker

Pro Headshot.jpg

Eric Parker lives in Seattle and has been teaching Tableau and Alteryx since 2014. He's helped thousands of students solve their most pressing problems. If you have a question, feel free to reach out to him directly via email. You can also sign up for a Tableau Office Hour to work with him directly!

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.

No time to watch? No problem. Here are the formulas you need.


Sales - MTD:

IF DATEDIFF('month',[Date],TODAY()) = 0

AND [Date] <= TODAY()

THEN [Sales]

END


Sales - PMTD:

IF DATEDIFF('month',[Date],TODAY()) = 1

AND DAY([Date]) <= DAY(TODAY())

THEN [Sales]

END


Looking for more helpful Tableau tips? Subscribe to the blog & YouTube Channel, register for an upcoming classes or sign up for an office hour for customized help.

How to Compare the Last Complete Week to the Previous Complete Week in Tableau

Nested IF Statements in Tableau (Video)

0