Queries :: Product Per Date - Show Days With 0 Sales

Aug 11, 2014

I'm trying to build a query that adds up the total sales for a given product per date. The problem I'm running into is some products have $0 sales on a given day and don't appear in the table I'm querying. How would I get the query to add a record for that day for the given product with 0 in the sales field?

To give more details, I currently have one table showing the sales data. It has a record for every sale that includes the product of the sale, the amount, and the date. In the query, I'm summing the sales for a given day and product. Then I plan to export to Excel where I will run additional analysis.

If there are no sales for the product in a day, I'd like it to list the date and product with a $0 in the sales column.

View Replies


ADVERTISEMENT

How Can I Create A Sales Form That Can Update Both The Product And Sales Tables

Oct 11, 2007

Am creating a Product-Sales Database, and I would like the corresponding Sales made in the Sale Table to be automatically deducted or to be reflected in the Product Table. The product table contains all my stock and has a relationship with the Sales Table. The Sale Table does not necessarily include the Stock. How can I create possibly a Sales Form that will be used as an entry point for all the products (stock) sold and automatically register the sold products in the Sales Table and at the same time make the required adjustments in the Products Table.

View 1 Replies View Related

Queries :: Expiry Date - How To Show Remaining Days Or Over Due In Query

Mar 5, 2014

I have a query call courses and field name expiry date I have add additional field within the query to show how many day left and how many days over the expiry date

Code : DayLeft:[expirydate]-now()

but i just get a error when i run the query

I also would like to ask is this possible to be done within the table e.g adding another field dayleft and some how add formula to calculate number days left or over due .

View 2 Replies View Related

Reports :: Show Salespeople With 0 Sales Within Date Filter?

Jul 6, 2013

I want a very basic report that shows:* all field reps (sales people),

* their quota in terms of new customer registrations

* their actual new customer registrations for a particular month

The report should include field reps with 0 sales. The query I've created works fine as long as there's no date filter. But adding <1/1/2013 removed all field reps with 0 sales. I want to make sure the filter concept was working before getting into date ranges.

Code:
SELECT DISTINCTROW tbl_ksFieldRep.salesRepName, tbl_ksFieldRep.quota, Count(tbl_customers.dateRegistration) AS NewRegistrations
FROM tbl_ksFieldRep LEFT JOIN tbl_customers ON tbl_ksFieldRep.[salesRepName] = tbl_customers.[ksFieldRep]
WHERE (((tbl_customers.dateRegistration)<#1/1/2013#))
GROUP BY tbl_ksFieldRep.salesRepName, tbl_ksFieldRep.quota;

View 2 Replies View Related

Combine Monthly Product Sales Query

Feb 27, 2008

I was wondering if there is a way to combine sales by month for a year where it would show the product then for say January and the total sales and so on for each month.

View 7 Replies View Related

How To Create Aggregate Sales Grouped By Product ID

Nov 6, 2014

I have created a Query that shows

The Product ID, Product Name, Quantity, Price, Gross Margin, Sales, Profit.

The only problem is that in the two tables I was given in my assignment, there were multiple dates for the purchase, thus even though I have 74 products there is multiple listings i.e.

110-10 Sofa Chair 5x $2 profit:$10 - october 11
110-10 Sofa Chair 6x $2 profit:$12 - october 12

I need to group it so that it becomes this.

110-10 Sofa Chair 11x $2 profit:$22

The date/location is not important, only the aggregate sales. Here is my SQL ....

SELECT SALES.PRODUCT_ID, PRODUCTS.ITEM, PRODUCTS.PRICE, SALES.QUANTITY, PRODUCTS.GROSS_MARGIN, Sum([Quantity]*[Price]) AS Sales, [Quantity]*[Price]*[Gross_Margin] AS Profit, PRODUCTS.WIDTH, PRODUCTS.DEPTH
FROM PRODUCTS INNER JOIN SALES ON PRODUCTS.PRODUCT_ID = SALES.PRODUCT_ID
GROUP BY SALES.PRODUCT_ID, PRODUCTS.ITEM, PRODUCTS.PRICE, SALES.QUANTITY, PRODUCTS.GROSS_MARGIN, [Quantity]*[Price]*[Gross_Margin], PRODUCTS.WIDTH, PRODUCTS.DEPTH, SALES.TRANSDATE
HAVING (((SALES.TRANSDATE)>=#9/1/2011# And (SALES.TRANSDATE)<=#12/31/2011#))
ORDER BY Sum([Quantity]*[Price]) DESC;

Nordic_Inventory1.zip

View 11 Replies View Related

Modules & VBA :: How To Make A Label Show When 10 Days Before Date Is Due

Jul 16, 2014

I'm trying to make a label show if the date in my next service field is 10 days till its due

This is what I have on a on current form event this works great but would like the message to appear 10 days before the date is passed

Code:
If Me.NextService < Date Then
Me.overdue.Visible = True
Else
Me.overdue.Visible = False
End If

Also tried this with no joy

Code:
If Me.NextService < Date <= 10 Then
Me.overdue.Visible = True
Else
Me.overdue.Visible = False
End If

View 5 Replies View Related

Queries :: Sum Of Sales - TOP 5 Agents By State Over Given Date Range

Sep 5, 2013

I want to get the sum of sales of the top 5 best agents by state.

I have been able to do the following, however, this only gives me the state of "vic". I want it to show all states.

SELECT TOP 5 filedata.Debtor, Debtors.FullName, Sum(filedata.NetTotal) AS SumOfNetTotal, Debtors.State, Count(filedata.BorQ) AS CountOfBorQ
FROM filedata INNER JOIN Debtors ON filedata.Debtor = Debtors.Code
WHERE (((filedata.BorQ)="b") AND ((filedata.DepDate) Between [Forms]![F-financemenu].[startdate] And [Forms]![F-financemenu].[enddate]))
GROUP BY filedata.Debtor, Debtors.FullName, Debtors.State
HAVING (((Debtors.State)="vic"))
ORDER BY Sum(filedata.NetTotal) DESC;

which returns

DebtorFullNameSumOfNetTotalStateCountOfBorQ1429ABC company147150VIC11360XYZ Company107204.55VIC32534MNO organisation68799.86VIC31168PQR business58934.67VIC31326FGH industries32480VIC2

(count of BorQ) is the number of sales

I have tried using UNION ALL and changing the State but that only caused syntax errors.

View 2 Replies View Related

Queries :: Next 7 Days From Calculated Date Value

Aug 4, 2013

In a query i have setup, i work out when a tenant is next due to pay their rent.

Looks like this

Tenant Last Payment Date Payment Terms Next Payment Date
User1 01/07/13 Monthly 01/08/13
User2 01/07/13 Weekly 07/07/13

The next payment date is calculated using an IF statement and DateAdd in the query, so if it is weekly it adds 7 days, if it is monthly it adds 1 month.

What i am trying to do is write sub query of this one which shows which tenants are due to pay within the next 7 days.

But the access query seems to ignore the criteria I'm putting in....in the next payment date criteria i have tried specifying >Now() + 7 or >Date() +7 but neither seem to work, it just shows up every record...

View 6 Replies View Related

Queries :: How To Select Records When Date Is Less Than 30 Days Apart

Mar 10, 2014

I have a large database filled with customer records. Some customers come one time. Other customers come 50 times at year. I want to find all customers that have records that are less than 30 days apart so I can ultimately see the types of products they buy. How do I write the query?

I attached a picture of a sample database. The 30 day (+/-) field doesn't exist but I would like the query results to build it.

View 11 Replies View Related

Queries :: Return Selected Date Plus Next Three Days

Mar 22, 2015

Ok, so I'm sure this is a pretty simple criteria, but I just can't seem to get the syntax right.

I'm trying to allow my user to select any start date and the query will return that date plus the next three days.

View 7 Replies View Related

Queries :: Adding Estimated Start Date With Days?

Feb 7, 2015

I'm working on a query ("Target Date of Completion") that takes the initial date started (from Step 1 of date started) and adds the EC (Estimated Completion) which is just shown in days. This will give an EST (Estimated Start time) for the next step in date format, which I would need the new column. Also, As you can see, the piece parts all have a different amount of steps, so this calculation would need to know when it's a different part.

View 7 Replies View Related

Product Pricing DB Looking To Show Similar Products

Mar 7, 2013

We have created a database (electrical contractor) of all our customers, invoices, work orders, etc. and been using since 2000. I have created 'not billed' reports and queries for specific types of jobs. Next step for me has been to create a db for our products we purchase from vendors. they can be the same product from different vendors, or same type of product from same vendor but different manufacturer.

We use this to order inventory, check contract prices once we receive invoices from vendor, and provide estimates to our customers so, there are many people looking to search different pieces. I have a good product base entered, and have been looking through sample templates to try to find a way to bring up similar items when you find 'widget1 from vendor1' i would like to click or show somehow 'related items' window?

View 2 Replies View Related

Queries :: Function To Calculate Date Diff In Network Days

Aug 7, 2014

I'm using the following function to calculate date diff in network days (excluding weekends)

Public Function NetWorkdays(dteStart As Date, dteEnd As Date) As Integer
Dim intGrossDays As Integer
Dim dteCurrDate As Date
Dim i As Integer
intGrossDays = DateDiff("d", dteStart, dteEnd)
NetWorkdays = 0

[Code] ....

So when using this function in a query to get number of networkdays between 2 date columns ...it works fine but throws a #Error where there is blank entries in either of 2 date columns...

I need to find a way to display Null instead of #Error...

I have tried this expression but no luck...

IIf(IsError(NetWorkdays([Date1],[Date2])),"",NetWorkdays([Date1],[Date2]))

View 7 Replies View Related

Date Add Problem (calendar Days Vs Working Days)

Dec 4, 2006

I have a query and I need the records to display 3 working days before the 15 working day deadline.

I used the following in the criteria box below the received date field and it doesn't pull the correct number of workdays, it's pulling calendar days instead.

<=DateAdd("w",-12,Date())

Can anyone help, thanks for your time!!!

View 8 Replies View Related

Date Add Problem (calendar Days Vs Working Days)

Dec 4, 2006

I have a query and I need the records to display 3 working days before the 15 working day deadline.

I used the following in the criteria box below the received date field and it doesn't pull the correct number of workdays, it's pulling calendar days instead.

<=DateAdd("w",-12,Date())

Can anyone help, thanks for your time!!!

View 6 Replies View Related

Forms :: Show Picture When Hovering Over Product Name In Order Form

Mar 11, 2014

I'm creating a database for a flower shop for training purpose. I have a main form with a sub form that has the orders in it. when placing a new order for a client and selecting the product from the combo box, it would be great if the product could show up to the right in the form.

I have no clue if this is possible and how to get it working. I have included the database as an attachment, which way to follow. I remember that I could do this on a web page, but a web page is not the same as a database.

View 5 Replies View Related

Forms :: Sortable Lists In A Form - Show People Who Have Product

Jan 14, 2014

I have a form I need to sort based on criteria in a persons record. We sell certain products. And we need the ability to only show the people who have a product. For example, we sell EPLI and WCF. I want to be able to pick a drop down list and it only shows and goes through the EPLI people. How do you do this?

I attached my database can you take a look on how to do this?

View 3 Replies View Related

Queries :: Counting Days Between Dates - Vacation Period And Work Days

Sep 11, 2014

I have a form called subfrm_vactions

rowsource is a query called qryVacations

the query should calculated two things

1 - the difference between start_vac and End_vac in days to calculate the vacation period and put the value in field called Period (working well)

2-the work days which the period between the last day in Previous record (End_Vac) and the (Start_Vac) in the next record (didn't work)

the result is the difference between (End_Vac) and (Start_Vac) in the same record which i don't want

simply i want to calculate the work days.

View 5 Replies View Related

Queries :: Number Of Days Between Two Dates With Irregular Days Worked

Apr 14, 2014

I have a form where a start date is inputted (Inputfrm , StartDate) and a form where the end date of the process is recorded (Inspectionfrm , EndDate) and these both record in the table InputTbl as StartDate and EndDate respectively.

I have created a union query which shows a list of all the dates where there is work recorded (WorkingDatesQry and the column of list of unique dates is "WorkingDate"), and as we run a highly varied schedule depending on time of the year and order numbers I cannot just use a query which says Monday-Friday or Tuesday - Saturday.What I am trying to do is to find the number of days between StartDate and EndDate where there is a date recorded in the WorkingDates query.

View 1 Replies View Related

Queries :: Missing Days - Creating Table With 31 Days Of Zero Values

Apr 3, 2013

Client has asked me to create a report showing summary of monthly sales by day. That was easy. I created a query for the month the user selected and then summarized and group the data by day. Client like the result but would like to see zeros on the report for non sales days. Non sales days are days like holidays and there are no sales.

I am thinking of creating an table with 31 days of zero values and then join the two tables in a query? Or, should I create a temporary table with code and then merge the two tables which the existing query which I can then use for the report?

View 4 Replies View Related

Modules & VBA :: Chart To Show Total Sales Ordered By Customers - Graph Method?

Sep 10, 2013

I've created an access chart to show total sales ordered by customers.

I'm using a form with 5 comboboxes to select 5 particular customers from a customer table and pass this information into a query.

This query is then used on a report to create the graph.

Finally there is a button on my form that prints this report.

My problem is that the chart displays the customers in alphabetical order and I would like to order the customers numerically based on total sales value.

If I change my query so that the total sales order by is ascending then when I run the query from the report I am asked to enter a parameter value for the total sales field. Entering nothing and pressing ok simply returns the same graph I would have got had I not changed the order option at all.

*The customer filed in the report is set to group by and my totals field is set to sum - but I need both of these set to produce the graph.

View 3 Replies View Related

Subtract Sales From Stock With Oldest Date First And Then Move To Next Date?

Sep 16, 2014

Table 1 has all the items I am trying to sell with sell by date after which I cannot sell this item. Then in Table 2 I have forecasted sales. So now I am trying to calculate stock consumption to see if I will be left with any stock that I cannot sell.

So now somehow I need to deduct sales forecast from my stock holding but it needs to go by date i.e. consume all stock for Item 1 with date 16/09 before moving to Item 1 with sale by date 23/09.

So based on the attached example, I can see that on 16/09 I will consume only 5 cases from sell by date 16/09 and another sale is 18/09. So that would give me information that I will be left with 95 items dated 16/09, which I cannot sell because they will be out of date.

I would like also to include the logic that if Item is out of date it would move to the next sell by date.

So in this case sale of Item 1 forecasted for 18/09 (94) would consume the whole stock (50) with date 23/09 and another 44 from date 01/10.

For Item 2 I can see that units with Sell by date 30/09 will be consumed on 25/09 and I will start taking stock from next sell by date which is 14/10.

View 2 Replies View Related

Show Only Records From Last 7 Days?

Sep 14, 2005

This is fairly simple i think although i cant do it right i have a field in a query named; "shiftdates" which uses the format: DD/MM/YYYY, how can i set the criteria for this to only show records from the past 7 days?

i think i need something like: date()-7 (this doesnt work though), anyone help me out?, :o

View 4 Replies View Related

How To Show All The Days In A Scpecific Month

Feb 12, 2008

Hi!

I want to show all the days in the specific month, e.g. there are 29 days in february 2008 and the records will display all the days that are available as below:
1/2/08
2/2/08
3/2/08
..
..
..
29/2/08

What is the syntax?

Thank you.

View 7 Replies View Related

Queries :: Show Only Most Recent Date For Each Customer

Nov 4, 2014

I have a query that selects a group of customers and order dates.

I want the query to only show the most recent date for each customer.

How would i achieve this?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved