What I am trying to do is break out spending by vendor and month/year, and then compare that spending to the same month last year. I though I could do this by simply getting my current spending in a subquery with a calculated field to find the prior year, and then join to another spending subquery using the prior year field. If I use datepart(), I get an invalid parameter error, and if I use month() and year() I get an invalid syntax near '(' error.
I’ve read through the thread below, but I haven’t been able to fix it, even by starting the query from scratch. Perhaps it’s an issue with my group bys?
That fixed it…it’s weird, because I used datepart() in the BAQ and it gave me the parameter error, can they get corrupted? It had more stuff going on, the BAQ I sent you is a pared-down version.