Solved

How can I use the Ms Access function DSUM in a manner similar to SUMIFS? Example Provided

Posted on 2016-10-27
2
25 Views
Last Modified: 2016-10-27
If you look at the posted Excel example you will find a SUMIFS function that is deriving last week's number by using the store as the first criteria and the weekstartdate-7 as the second criteria. Is there a method where I can achieve the same results using the data in  columns A-C to accomplish what the function is doing in D?
Example.xls
0
Comment
Question by:Ryan Simmons
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 41863242
better is to use a Query with subQuery, import your excel file to access and call it myTable

SELECT myTable.[Store Number], myTable.WeekStartDate, myTable.WFMR_DEMAND, CDbl(Nz((select Min([WFMR_DEMAND]) From myTable As A where A.[Store Number]=myTable.[Store Number] And DateDiff("d",A.[WeekStartDate],myTable.[WeekStartDate])=7),0)) AS Expr1
FROM myTable;
0
 

Author Closing Comment

by:Ryan Simmons
ID: 41863299
Good point. Ty!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now