Access Sumifs

mahmed1

Well-known Member
Joined
Mar 28, 2009
Messages
2,302
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi

how can I achieve this same result in Access...

essentially i want to add up the AHT column and divide the totals column only if the date is > #01/01/2020# AND < #01/02/2020# AND TYPE = ‘YELLOW’ and put this result in Weighted column

i tried this with no luck

Select Date_, Type, Total, Sum[AHT Colum]/[Total] as Weighted Column
WHERE Date_ > #01/01/2020# AND Date_< #01/02/2020# AND Type = ‘YELLOW’
Group by Date_, Type, Total
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
What is the name of your table?
 
Upvote 0
This?
SQL:
SELECT 
   Date_, 
   Type, 
   Total, 
   Sum([AHT Colum])/Sum([Total]) AS [Weighted Column]
FROM
   tbl_RawData_Rolling
WHERE 
   Date_ > #01/01/2020# AND Date_ < #01/02/2020# AND Type = ‘YELLOW’
GROUP BY 
   Date_, 
   Type, 
   Total
 
Upvote 0
If you still have trouble post a few rows of sample data and expected result with that data.
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

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