I have 2 queries that basically do the same calculations. The first goes by monthly basis and the second by quarter. I created a form where a user selects mm-yyyy as a start and end date for their summary outcomes. Usually, the way they select their dates goes by a selected current month and the entire full year before that.
My monthly query is great but for some reason my manager wants me do the following for the quarter query:
If (end-date selected is either Jan, Apr, Jul or Oct) then delete 5th row on the query and replace it with month content from monthly report e.g. 2014Q1,2014Q2,2014Q3,2014Q4 & (01/2015 from monthly query).
If end-date selected is either Feb, May, Aug or Nov then delete 5th row on the query and replace it with month content from monthly report e.g. 2014Q1,2014Q2,2014Q3,2014Q4 & (01/2015 & 02/2015 from monthly query).
If end-date selected is either Mar, Jun, Sep or Dec then keep 5th row on the query e.g. 2014Q1,2014Q2,2014Q3,2014Q4 & 2015Q1.
Could you please tell me how to accomplish that - Thanks.