Access Sumifs

Lesceline Gibson

Well-known Member
Joined
Apr 6, 2012
Messages
753
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
 

Some videos you may like

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

JonXL

Active Member
Joined
Feb 5, 2018
Messages
302
Office Version
365, 2016
Platform
Windows
What is the name of your table?
 

JonXL

Active Member
Joined
Feb 5, 2018
Messages
302
Office Version
365, 2016
Platform
Windows
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
 

xenou

MrExcel MVP, Moderator
Joined
Mar 2, 2007
Messages
16,601
Office Version
2013
Platform
Windows
If you still have trouble post a few rows of sample data and expected result with that data.
 

Forum statistics

Threads
1,089,218
Messages
5,406,922
Members
403,112
Latest member
rminor

This Week's Hot Topics

Top