Tableau: Current vs Previous Month Sales

In tableau, you can create LODs that will bring back your Current vs Previous month sales. 5 calculations for your month difference is needed.

  1. Current Month - find your most recent month in the dataset:

{MAX(DATETRUNC("month",[Order Date]))}

  1. Previous Month - Finding the previous month from your current month:

DATEADD("month",-1,[Current Month])

  1. Current Month Sales - Using your calculations previously made, we can now find the sales within the current month. For this we need an IF Statement:

IF [Current Month] = DATETRUNC('month', [Order Date]) THEN [Sales]END

  1. Previous Month Sales - likewise for your previous month, this also requires an IF Statement:

IF DATETRUNC("month",[Order Date]) = [Previous Month] THEN [Sales]END

  1. MoM calculation - Final step is to create that difference calculation between your months:

(SUM([Current Month Sales])-SUM([Previous Month Sales]))/SUM([Previous Month Sales])

Now put your calculations into view

Author:
Alexandra Skelly
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab