SQL and Criteria help - sums, group and categories - Access 2010

craigmase

New Member
Joined
Apr 23, 2015
Messages
28
Please save the wall from my banging head!!

I have 3 fields i'm trying to produce information from
Recovery handler
Recovered amount
Date logged
which is from the Table - TBL_CASES

I'm trying to produce information of total sum recovered, per month, per handler

the SQL i have at moment is
"SELECT ([Recovery Handler]) as Handler, Sum(TBL_CASES.[actual recovery]) AS Recovered
FROM TBL_CASES
GROUP BY ([Recovery Handler])"

this so far has a total recovered per handler, but not by month

When I've tried grouping on crosstab it only picks up recoveries logged on the 1st of each month
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Try something like:
Code:
[COLOR=#333333]SELECT ([Recovery Handler]) as Handler, Format([Date logged],"yymm") as MonthLogged, Sum([actual recovery]) AS Recovered[/COLOR]
[COLOR=#333333]FROM TBL_CASES[/COLOR]
[COLOR=#333333]GROUP BY [Recovery Handler], [/COLOR][COLOR=#333333]Format([Date logged],"yymm")[/COLOR]
 
Upvote 0

Forum statistics

Threads
1,221,827
Messages
6,162,200
Members
451,753
Latest member
freddocp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top