Before talking about Month-over-Month in Alteryx let’s take a step back. What is Month-over-Month (MoM)? MoM growth shows the change in the value of a metric as a percentage of the previous month’s value. This is a common way to assess your product or company’s success. In Alteryx, there is 3 steps to achieve this. You can use the same logic for Year-over-Year calculation.

  1. Generate the previous month column
  2. Self join to get the month’s value on the same row as the previous month’s value
  3. Calculate the percent difference from previous month
Alteryx workflow - how to build a Month-to-Month

Calculate the Month-over-Month in Alteryx: step by step

Below, this is the dataset used for the demo. For clarity, it contains only the sales by month for 2 product A and B.

Alteryx - table

Alteryx Month-Over-Month – Step 1

First step is to calculate the previous month, by using a formula tool and the DateTimeAdd formula. If your date field is in string format, you should use the DateTime tool to convert it. Find how to use it in this blogpost

how to calculate in Alteryx Month-over-Month; first step

Alteryx Month-Over-Month – Step 2

Now that we have this new column with the previous month, we can self-join the table by using month and previous month as a key. Previous month should be in the left key and Date (Month) should be in the right key. The Join tool can be used as a Select tool so we can deselect the fields not needed and rename the field ‘Right_sales’ as ‘Sales previous month’.

Alteryx Month-over-Month; step 2

In the L output, there are one month which didn’t match from the input. January 2020 because we don’t have the previous month (December 2019) in our dataset. We don’t want to miss this month so we use Union tool right after to gather the left and the join output.

join table

Alteryx Month-Over-Month – Step 3

Then the last step is to calculate the percentage difference from previous month with a Formula tool.

MoM last step

Below this is the result you obtain: a new column with the percent difference of sales from previous month!

end results

Do you want to learn more about Tableau or Alteryx? Do you want to use these tools to their full potential? Check out our trainings and consultancy services!