In reading through some of the older posts on the different uses of DSum I am wondering if it is something like this that I should be using. My problem is though, its not letting me use the Dsum with an if statement. This is an example of what I have
Code Desc Period Year amt
123 yellow 5 2010 65.00
123 yellow 6 2010 20.00
123 yellow 6 2009 10.00
What I am rying to do is have the following columns running the query for period 6 and year 2010
Code CY CYTD PY PYTD
123 20.00 85.00 65.00 65.00
CY = data for period 6 year 2010
CYTD = data < = period 6 2010
PY = data for period 6 2009
PYTD = data <= period 6 2009
Currently I have seperate queries to gather each piece and then combine them in order to create the report and I am trying to find a better way to do this.
Code Desc Period Year amt
123 yellow 5 2010 65.00
123 yellow 6 2010 20.00
123 yellow 6 2009 10.00
What I am rying to do is have the following columns running the query for period 6 and year 2010
Code CY CYTD PY PYTD
123 20.00 85.00 65.00 65.00
CY = data for period 6 year 2010
CYTD = data < = period 6 2010
PY = data for period 6 2009
PYTD = data <= period 6 2009
Currently I have seperate queries to gather each piece and then combine them in order to create the report and I am trying to find a better way to do this.