By: Eric Parker
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!
Hey everyone! We are back with another one of the “To Date” calculation videos many people know us for.
Need to calculate Quarter to Date vs. Previous Quarter to date in Tableau? Check out the video below to learn the simplest method.
In addition, you can easily tweak this formula to compare to the same quarter last year, or any other quarter of interest.
Here is the code behind the calculations.
Quarter to Date Calculation
IF DATEDIFF('quarter',[Date],TODAY()) = 0 THEN [Sales] END
Previous Quarter to Date Calculation
IF DATEDIFF('quarter',[Date],TODAY()) = 1
AND [Date] <= DATEADD('quarter',-1,TODAY())
THEN [Sales] END
Thanks for checking out our video. Feel free to contact us with questions or if you’re looking for help on your own Tableau dashboards!