Solved

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

Posted on 2016-10-27
2
35 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

809 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