We help IT Professionals succeed at work.
Get Started

3 Month Moving average with three criterias

ovelove asked
Last Modified: 2016-03-16
Looking for a way to calculate a three month average with three criterias (Transaction date, Area and product id).

Current code is: MovingAverage: DAvg("Sales","Table1","Area ='" & [Area] & "' AND Month(format(TransactionDate,'mm/dd/yyyy') <" & (Month(Format([TransactionDate],'mm/dd/yyyy')+2)\3))

Struggeling with the Transaction date as I only receive an error in the query (the data is only monthly and all data is therefor set to 1/1/2015 for Jan and 2/1/2015 for feb).

I would also need product ID to be part of the criteria for the three month moving average.

Any suggestions?  I've attached the test database as well.
Watch Question
Top Expert 2016
This problem has been solved!
Unlock 2 Answers and 5 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE