Access Sumifs

Lesceline Gibson

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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

JonXL

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

JonXL

Active Member
Joined
Feb 5, 2018
Messages
325
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,626
Office Version
2013
Platform
Windows
If you still have trouble post a few rows of sample data and expected result with that data.
 

Watch MrExcel Video

Forum statistics

Threads
1,095,168
Messages
5,442,793
Members
405,197
Latest member
queryashish

This Week's Hot Topics

  • Copy entire row if CountA <>0 to another sheet
    [B]I want to copy entire row if CountA <>0 for column J7:AM7 (headers on J6:AM6) and so on till the last used cell is column D and paste the...
  • Select last used Row in Table
    I have created a Table in a Worksheet which is locked to prevent user errors and protect formula. Some of the cells require freetext entries which...
  • excel workbook: do not allow certain file name
    Hello all, Don't think this has ever been asked before, but how do I restrict file save [Before_Save Event] if the name of the file being saved...
  • fixing problem autofilter
    hello i need help about my code when i search by code in textbox it doesn't show anything this is my data [ATTACH type="full"...
  • “Weight”
    Hi, i’ve got a long sheet filled with weights such as kg,g,L & ml. i can build a formula to convert kg into g and liter into ml. How ever, my...
  • How to capitalize everything before a certain character?
    In column A, I have some text: Hello good day.mp3 Hello good day.flac etc. I'd like to capitalize everything before the period. I don't need the...
Top