3 Replies Latest reply on Dec 16, 2016 10:31 AM by Ty Stackhouse

# Showing Moving Average From Change Date

I have a measure for moving average and for the date of the latest price change. I would like to see what the moving average was in the month of the price change. Is there a way that I would be able to pull the moving average from the price change date and bring to the current month so I would be able to compare the two? I am currently using  LOOKUP([MovingAverage],-3) function to simulate a price change that happened three months ago.

• ###### 1. Re: Showing Moving Average From Change Date

Ty,

I'm a little confused on what you are looking to do. Could you provide the community some pictures/attached workbook of what you are trying to do?

As far as moving average for price change, you're in luck! Tableau already has a moving average calculation. Have you tried doing this to your measure?

I hope this starts moving you in the right direction!

• ###### 2. Re: Showing Moving Average From Change Date

What I am trying to do is to identify the month that the price change occurred in(which I have in a measure). Then be able to compare that moving average of volume of that month with the volume of the most recent month that we have complete data for(November). I want to be able to see if a change in price has affected our change in volume. In the example, Product B had a change date on October 1st. I want to be able to take the moving average of volume from the previous 6 months from that date(I do have that part), and then compare it to what the volume was in November. Hopefully it will tell me whether or not the change in price had an effect on volume.

• ###### 3. Re: Showing Moving Average From Change Date

In the picture, Volume is quantity filled.