Click to See Complete Forum and Search --> : Date and group selection


Monkeydood
June 20th, 2008, 06:03 AM
If anyone can help with query it would be great - i am going round in circles.... It's HR related and I want to create a formula that gives a sum of Applicants for each Post, for the last 3 days.

My simplified data table is like:
Date Post No Of Applicants
12/6/2008 Administrator 5
12/6/2008 Sales East Rep 10
13/6/2008 Administrator 6
13/6/2008 Sales East Rep 2
19/6/2008 Administrator 4
19/6/2008 Sales East Rep 7
20/6/2008 Administrator 3
20/6/2008 Sales East Rep 5

So for last 2 days (19th and 20th) I want Administrator to return 7 and Sales East Rep to return 12. I tried some combinations with 'if' statements but no joy. Any ideas...... Ultimately I want to add them to a chart showing post/application. Thanks very.

jggtz
June 23rd, 2008, 02:41 AM
You can do it using a formula then set a group by that formula

If Day({MyDate})=19 Or Day({MyDate})=20 then "MyLast2Days" else " "


The inconvenience is that you have to change the formula every day...