Count Function Advice

asmolow

New Member
Joined
Jan 12, 2015
Messages
8
I have a a query counting the number of records between two date values by week. It's specifically counting the number of days that a scheduled work order has in each accounting week. The query is taking an inconvenient amount of time to run and I'm not sure how to improve it.

Does anyone have any advice on how to speed it up or an alternative function to use?

This is the SQL:

Code:
SELECT [Adj and Filt MM214].[Work Area], [Adj and Filt MM214].[Work Order], [Adj and Filt MM214].[WA Scheduled Start], [Adj and Filt MM214].[WA Scheduled Complete Date], [Calendar Date w WK End].[Wk Ending], Count([Calendar Date w WK End].[Calendar Date]) AS [Days per Week]
FROM [Calendar Date w WK End], [Adj and Filt MM214]
WHERE ((([Calendar Date w WK End].[Calendar Date]) Between [wa scheduled start] And [wa scheduled complete date]))
GROUP BY [Adj and Filt MM214].[Work Area], [Adj and Filt MM214].[Work Order], [Adj and Filt MM214].[WA Scheduled Start], [Adj and Filt MM214].[WA Scheduled Complete Date], [Calendar Date w WK End].[Wk Ending];
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,221,899
Messages
6,162,686
Members
451,782
Latest member
LizN

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