Solved

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

Posted on 2016-10-27
2
55 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

688 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