View Single Post
  #2  
Old December 16th, 2009, 02:15 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default Help in Sales Analysis - Northwind template

If you are going to use MOD to number the months from 1 to 3, then try the
following expression.

((Month([Order Date])-1) MOD 3) + 1

MOD 3 will return 0, 1, or 2 and you want 1, 2, and 3 so you need to add 1 to
the result of the Mod Operation.

You also want 1,4,7 and 10 to return zero when using MOD so you need to
subtract 1 before using MOD so you get
0 for months 1,4,7,10
1 for months 2,5,8,11
2 for months 3,6,9,12

Then you add 1 to the result to get 1,2, or 3.

This may or may not fix the fact that sales for December do not show up. I
suggest you post the SQL of the query you are using.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Coco111 via AccessMonster.com wrote:
Anybody Please help... Sorry again, in Northwind template 2007. I found
something wrong in sales Analysis, but I dont know how to solve.

Queries of sales analysis show below-

MonthOfQuarter: (Month([Order Date]) Mod 3), in data sheet view oct = 1, Nov
= 2, Dec = 0 and sales of Dec did not show up. I guess Dec should be 3, if
im not wrong. What do you think and how to solve the problem. The sales of
dec month did not show up...it shows no sales or 0 in quarter sales report
summary. Thank you.