3 Replies Latest reply on Jan 11, 2017 6:48 AM by Dhruv Gupta

# How to calculate difference (growth) between MTD Sales and Previous MTD Sales

I have 2 separate calculated fields:

1. MTD Sales:

IF [Day] <= TODAY()

AND DATEDIFF('month',[Day],Today())= 0 THEN [Sales] END

and

2. Previous MTD Sales (the same period as MTD Sales but for previous year)

IF [Day] <= [1 Year ago]

AND [Day]>= [Datetrunc] THEN [Sales] END

where field [1 Year ago] =DATEADD('year', -1, TODAY())

and field [Datetrunc]  = DATETRUNC('month', DATEADD('year', -1, TODAY()))

??? How can I calculate percent difference between MTD Sales and Previous MTD Sales???

• ###### 1. Re: How to calculate difference (growth) between MTD Sales and Previous MTD Sales

Hi Karolina,

Follow below link for better understanding on Comparing 2 different periods on same data

Hope this help!!

Thanks,

Dhruv Gupta

• ###### 2. Re: How to calculate difference (growth) between MTD Sales and Previous MTD Sales

Hi Dhruv!

Thank you so much for your help and link, but unfortunately I couldn't find answer to my question. I've found the field +/- MTD as ([MTD]-[MTD_1])/[MTD_1] but it doesn't work. I need something similar for different MTD and the same data.

How can I modify this formula?

• ###### 3. Re: How to calculate difference (growth) between MTD Sales and Previous MTD Sales

Hi Karolina,

Refer the attached package, i have used the superstore sales data and 10.1desktop version.

Hope this helps!!

Thanks,

Dhruv Gupta