4 Replies Latest reply on May 5, 2018 2:41 AM by sudheer.kumar.5

How to add X number of months to a data point and have it return the measure value for that month in 36 months?

Hi Tableau community,

I have monthly car sales numbers going back a few years. Let's say sales in Jan 2013 were 1,000. I would like to create a calc where I can say take Jan 2013 sales, add 36 months, and return the measure value of 1,000 for Jan 2016 and so-on for a number of months.

Is this possible? I am not very familiar with calcs that include dates and returning a measure from a previous date X number of months later.

Thanks,

Ava

• 1. Re: How to add X number of months to a data point and have it return the measure value for that month in 36 months?

Hi, Ava

Have you tried

ZZ

1 of 1 people found this helpful
• 2. Re: How to add X number of months to a data point and have it return the measure value for that month in 36 months?

Hello Ava,

Something like below?

With Calculation 1 or without Calculation 1 the sale value will remain the change as below:

Regards,

Sudheer

1 of 1 people found this helpful
• 3. Re: How to add X number of months to a data point and have it return the measure value for that month in 36 months?

Thanks for your response - this works. I have a dimension called Sales Types, which is Sales Types - A & B. Let's say for Sales Type A I want to do the date function above where it returns the value of 1000 from Jan 2013 in "Jan 2016" (the calculated field date) but then my sales type B has its own true value of 2000 in Jan 2016 and I don't want to apply the date function to that. In other words, I want to have Jan 2016 and then see sales type A as 1000 and sales type B as 2000 where type A is the value from 36 months prior and Type B is just the true value in Jan 2016. Do you know how to do this?

• 4. Re: How to add X number of months to a data point and have it return the measure value for that month in 36 months?

Hello Ava,

Is it possible for you to add sample data or .TWBX file?

S