Display Only Last Week's Sales

Jan 19, 2006

Hi all,

I dont know much about access forms - but I have a table that contains all of the members on my site, and the date they joined. Each member can be seen as a sale on my product, so at the moment Im using a simple graph (made using a wizard - shame on me) that just drags out the DateJoined values from the members table.

The result is a bar chart indicating how many sales I made on each day.

Its getting a bit big, and I want to know how I can get it to only drag out last week's sales. I think it will have something to do with the 'Row Source' property of the graph. At the moment its value is...
Code:SELECT (Format([DateJoined],"DDDDD")),Count(*) AS [Count] FROM [tblMembers] GROUP BY (Int([DateJoined])),(Format([DateJoined],"DDDDD"));

Thanks all!

View Replies


ADVERTISEMENT

Queries :: Table Of End Of Week Sales - Query Where There Is No Match

May 4, 2014

I have a table of end of week sales with ProductID, Volume_Sold, Year and WeekNo. I am about to create a historical table of RRP.

What is the best way to set this out so that I can query the two tables to that when I run a query over the two tables I get the correct price depending on the year and week number I am working with.

tblSales
Year int,
Week int,
CountryCode nvarchar (2),
StoreNo, nvarchar (35),
ProductId nvarchar (15),
Volume_Sold int;

My new table
"tblRRP"
Could contain
Year int,
Week int,
CountryCode nvarchar (2),
ProductId nvarchar (15),
RRP float;

The table is only appended to when the price changes. So some products may have a price increase 2 or 3 times a year others once every 18 months. And if the price changes any calculations need to allow for the 2 or 3 different RRPs the Product may have had during the queried period.

So that when I do year on year revenue calculations it works properly.

View 6 Replies View Related

Display All With DOB Within A Week

Oct 2, 2006

Hi, I am doing a project at school and need to run a query that displays everyone that has a date of birth within 7 days using a date in the format 01/01/2001. I really have no idea how to do this and would really appreciate any help.
Thank you very much
Kris

View 2 Replies View Related

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

Display Date And Week Number??

Apr 10, 2008

hi

i would like to display the date and week number on one of my forms but have no idea about dates and how to code this.
can some one help? id appreciate it it beyond me :confused:

thanks :)

rob

View 4 Replies View Related

Queries :: Grouping Data By Week And Display

Mar 19, 2013

I am trying to create a query that will group my data by each week so I can sum up some numbers and display them on a per-week basis... Prefer the week to start on Sunday but really not picky about it.

Using the following in the query design window.

Week of Year: Format([Date],"ww")

This is returning:
1
10
11
12
2
3
4
and so on.. See the problem?

I tried sorting but that doesn't work.

I also tried the following:

Format([Date],"mmmm,ww")

But this is returning
December,51
December,52
February,8
February,9
January,1
January,2
January,3

Yes, there are some weeks without data but that's not the problem. The issue is that its putting February before January.. Why is this? Again, I tried sorting options and several other techniques but no success.

View 5 Replies View Related

Query Criteria To Display Current Week Only?

Jan 23, 2012

I have a database that lists jobs that need doing, in the jobs table there is a Deadline field, this is a Date Time field that specifies when a job must be finished by.

So I'm trying to make a query, using my limited knowledge, that displays all jobs that need finishing between todays date and the rest of the week.

So I tried this and got nowhere:

Between #(Date())# AND #(Date()+7)#

View 4 Replies View Related

Tables :: Calculated Field In Table - Display Week Number

Jan 13, 2014

I am trying to create a calculated field in my table, I am trying to use the following code:

DatePart("ww",[Gas]![Date Opened])

I receive the following error message: "The expression DatePart("ww",[Gas]![Date Opened]) cannot be used in a calculated column."

Access 2007 - I really need to be able to display the week number in the table, based on the Date Opened field.

View 6 Replies View Related

Reports :: Inserting Page Break To Show Week By Week Pages

Feb 11, 2015

I've created a report based on a query that shows me the jobs that have been added to tblJobs between two selected dates.

The report works fine and displays all the information I need, however other than being sorted by day of the week i.e. Monday, Tuesday, Wednesday etc. The records just run on one after another.

I want to create a page break, so that a full week is shown on a single page before then forcing a new page when it moves in to the next week.

View 8 Replies View Related

Week Commencing Day From Week Number

Nov 6, 2006

I have a query that groups records by date into week numbers using the following expression.

WeekNumber: DatePart("ww",[Date],2)

I would prefer to display the result as the week commencing Monday date.

How?

View 13 Replies View Related

When The Last Week Of The Year And The First Week Of The Next, Are The Same!

Mar 18, 2006

I have the following expression which works nicely to group all of my dates into their respective weeks of the year, by week dates beginning Mondays:

WeekStart: ([MyDateField]+1)-DatePart("w",[MyDateField],2)

However, since the week beginning 12/26/05 crosses over both '05 and '06 (as week 53 and week 1), I get two groups of dates recorded for the week of 12/26/05 when I run my query.

Since my chart is based on weekly totals, I can't have two separate totals with the same 'week beginning' date.

How can I adjust my code to get one total group of dates for the week of 12/26/05?

Help greatly-needed!....

View 1 Replies View Related

Cash Sales Vs Invoices

Mar 25, 2007

I'm creating a database where I have a customers and invoices table, obviously there is a relationship between the two tables using a customerID field where I have referential integrity enabled. However not all invoices require a customer account as some are cash sales where no customer details are required.

I'm unsure of the correct procedure, all I can think of is to create a separate table for cash sales??

View 3 Replies View Related

Querry About Sales Commisions

Oct 1, 2005

Hi There
I Need A Querry For Commission Sales.
I Have 10 Items 7 Items At 2% Of Commission 3 At 4%. Each Salesman Have To reach A Min Of 5000 USD Of Sales Per Month Then All Sales Above That Amount Commission Will Be Calculated.
I Need A Querry To Calculate Sales And If Salesman reached The Min Sales Commission Is Calculated .

Any Help ???????
Thanks

View 1 Replies View Related

Calculating MTD And YTD Sales For Report

Dec 1, 2005

I have been stuck on this one for a while. I have an Access 2003 Database that I need to calculate the MTD sales and the YTD sales of parts ordered

Here are the relevant tables and thier attributes
Part -
PartNum
Description
UnitPrice
OnHand
ReorderPoint

Orders -
OrderNum
OrderDate
CustomerNum
CustomerPONum

OrderDetail -
PartNum
NumOrdered (Quantity)
QuotedPrice
NumShipped

If I have left anything off that may be vital please ask and I will supply the info. I need this info ASAP though.
I think the answer has something to do with the Date() and CurrentDate() but I have no clue. Please let me first know the queries I need to run and that should be it. I just need to put MTD and YTD Sales in a report.

I REALIZED THIS SHOULD BE A QUERY THIS WILL BE POSTED IN QUERY INSTEAD

View 10 Replies View Related

Query Sales Anlaysis

Jan 16, 2006

Good afternoon

I have two tables - sales 2004 and 2005 - both showing account number, product, quantity, sales and margin. When I link account number and try to show both years the results are incorrect.....I know I am doing something wrong!! I have tried creating new table with blank fields for 2005 basing the table on 2004 and then updating 2005 - but no go.....

Help please

Many thanks

Catherine

View 4 Replies View Related

Sales Transaction Query

Mar 17, 2006

hi there...

I have been looking around the forums for a little while now... and cannot seem to find anything which will help me.... heres my query..

I have a stock control database.. which allows for sales transactions via a barcode reader...

my first query is.... when the user scans a product.. how can this be 'looked up' in the (UPC data table)... returning the correct information.. ie.. description.. but then taking the price from the product table.. the query doesnt seem to let me be able to join the two tables.. no idea why!?

secondly.. I want to create a form.. for the 'sales transaction'.. when the user clicks 'pay' i want the form to clear and store all these items in the sales table.. (deducting the units in stock at the same time..)

I hope anyone has any suggestions.. or pointers! Many Thanks
:)

View 7 Replies View Related

Negative Sales Goals

Nov 30, 2006

Sounds weird huh?

I have a salesman that has a negative "Net Flow" goal (sales goal). Others have positive goals.

His YTD Net Flows (Sales) is say...$1062 (million) and his goal is "-266 million"
Of course he is doing quite well, when I use the following code to get a % to goal I get "0" whenever there is a negative goal involved.

% to Goal: IIf([NetFlowsGoal]>0,([Total Net Flows]/[NetFlowsGoal]),0)

But it works fine if all numbers are positive as you might guess.

Any pointers would be great...Thank you

View 4 Replies View Related

Difference Between Weekly Sales

Sep 11, 2011

In a table I have the sale of a department:

week SP Value UNIT
N John 100 8
N-1 John 80 6
N-2 John 120 10
N-3 John 90 9
(just the last 4 weeks and N sale professional)

I would like to have a form with

SP Value N-1 N-2 N-3 Units N-1 N-2 N-3
JOHN 100 20 -40 30 8 2 -4 1

And this go on for each SP

View 1 Replies View Related

Query Based On The Higher MTD Sales

May 29, 2006

Hello,

I need to write a query based on the higher MTD sales in the series of each fabrics within series of Sales Group and Prod Group . All info is from one table

Order by: Sales Group (alphabetical ord) , Prod Group (alphabetical ord) , sort Fabric Group based on the TOP MTD sales

Sales Gr: Active
Prod gr: Adult, Girls, Plus, LG
Fabric Gr: a,b,c,d,e,f...
StyleNum: 1,2,3,4,5,6...(PK)

Sales Gr: Dance
Prod gr: Adult, Girls, Plus, LG
Fabric Gr: a,b,c,d,e,f...
StyleNum: 1,2,3,4,5,6......(PK)

Sales Gr: Yoga
Prod gr: Adult, Girls, Plus
Fabric Gr: a,b,c,d,e,f...
StyleNum: 1,2,3,4,5,6......(PK)

Thank you

View 1 Replies View Related

Sales Order Line Pricebreaks

Jul 11, 2007

I'm not sure if I have a table structure, query or Form/subform problem, so I'll post here and see what happens

Objective - From a Sales Order form (and linked Sales order Lines subform) once the Item to be sold has been selected and quantity entered, I wish to check against a Pricebook table, where each item has 3 price/quantity breaks stored and have the correct price drop into the sales order line

Any suggestions on what is the best technique to achieve this?

ps not too bad using standard query builders etc, but pretty hopeless at code (which is one of the reasons for joining, to improve in this area)

So far found this a great place to be, lots of good advice from lots of helpful people

Thanks

View 9 Replies View Related

Setting Up A Table For Sales Figures

May 6, 2005

Dear All,
My boss wants me to create a budget report as follows:

Rep Cust ActM$ BudgetM$ VarM$ ActMProfit BudgetMProfit VarMProfit

ActYTD$ BudgetYTD$ VarYTD$ ActYTDProfit BudgetYTDProfit VarYTDProfit


I have a table with the following headings:

Date State Product Prod Code Customer Cust Code Category Jan Feb Mar etc

State has the domain Vic, NSW, Qld
Category has the domain Sales GP

Question 1:

To the field Category, should I either

A: add to the domain actual sales and actual profit? I can past these into the table at the end of each month.

OR

B: set up a separate table for the actual sales and actual profit for the month?

I think A.

Question 2:

Instead of having a separate column for each month, should I either:

A: just have a heading Month and put the figures in that column

OR

B: Have the sales figures in separate columns for each month?

I think A

Question 3:

When I have set up my table correctly, and assuming the answers to my questions above are all "A", I am now unsure how to create a query which will give me the data for the report my boss wants.


Can someone please give me some help?

Thanks
Bon

View 4 Replies View Related

How To Treat Tiered Sales Commissions

Nov 1, 2005

I'm working on a contact manager/sales manager database for a company where commission plans are tiered based on the gross margin generated from the sale. The company also has two types of commission plans available to the sales rep (Straight commission & Commission + Base). Here is an example:

I would like to be able to use a table to hold the tiered levels and then use code that would look at the gross margin and determine the correct tier that the sale falls into. Is this possible? If so, can someone please share an example?

Your help will be greatly appreciated and I will definately share the finished project with the group. Thanks!

View 5 Replies View Related

Crosstab Quarterly Sales Query

Mar 3, 2007

I have created a cross tab quarterly query to sjow the 4 quarters sales.

Problem is if there is no sales in one of the quaerters, the report based on that query gives an error as per attached photo and do not open.

any work around

View 1 Replies View Related

Stock And Sales Form/Sub/Append!?? Help

Nov 10, 2006

hi,

i have three tables - Customers, Sales, Stock

i have a form (like an on screen invoice) for sales. This shows the Customers Details and what stock they have bought. The customer details are the main form and i have a sub form with the stock, however i realised that this would not work (as a sub form is for adding stock not appending existing stock.)

Ideally i would like to type the stock number in, then the details of that piece of stock come up, then i want to change bits (a tick/untick box) but this would not work on a sub form. Customers buy UP TO 5 pieces of stock in one sale.


Any ideas?

thanks

View 9 Replies View Related

Queries :: Fill No Sales Months With 0

Aug 9, 2013

I am pulling sales results per customer and month. For presenting the numbers in a diagram I would like to show 0 sales for months in which no sales were generated. At the moment the query results only the months in which there are sales > 0. Is there a trick that I don't know?

SELECT Year([InvoiceDate]) & ' ' & Month([InvoiceDate]) AS [Month], totalsales_per_invoice([invoices]![InvoiceID],[invoices]![tax]) AS Ausdr1
FROM Invoices INNER JOIN customers ON Invoices.CustomerID = customers.CustomerID
WHERE (((Invoices.InvoiceDate) Between #1/1/2013# And #7/1/2013#) AND ((customers.CustomerID)=145))
GROUP BY totalsales_per_invoice([invoices]![InvoiceID],[invoices]![tax]), Year([InvoiceDate]), Month([InvoiceDate])
ORDER BY Year([InvoiceDate]) DESC , Month([InvoiceDate]) DESC;

View 3 Replies View Related

DSum Function To Sum Sales Of Each Customer?

Jun 5, 2014

Can Dsum function sums the sales of each customer. For example, let say we have the following query

Code:
QueryCustomerSales
Customer Name
Order ID
Item
Amount
Price

So, can i get output something like :

Code:
John 200.540 $
Mark 300.350 $

I tried the following code "

Code:
Dsum ("[Amount] * [Price]", "QueryCustomerSales", "[Customer Name]= [Customer Name]")

However, it returns the sales of all customers (all together ):

Code:
John 500.890 $
Mark 500.890 $

View 5 Replies View Related







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