Hello!
Need some help with the query in the following link:
It works perfectly as per the requested need on year & month where we want to see sum of last 3 years for any given month in the year.
I just noticed that if I aggregate data on yearly basis, then the additions are off as it adds all the results from each month and each month aggregates previous years values, thus, adding duplicated figures. Is there a way to aggregate on yearly data that shows the right output for year also. OR the only option would be to have one table for yearly output & one for year & month separately?
Also, I noticed December of each Year would give the right result for the year output. Of course, we can create a separate table, using this info as well as using the same concept as was done earlier. But if there is a way to aggregate yearly info in the same dataset, it would help to a great extent.
Thanks for your help in advance!