473,323 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Entering formula in field

Hi,

I'm using a query which shows the total spend DDP/EUR per month per profit centre (given by the profit centre). I have also added what the total should be (COGS 5999 or 1300).

I would like to add (in the query) the percentage of reported total spend

As -> total spend (given by company) / COGS 5999 = ..%

How can I put that in my query? As I do not know where to place it (i.e. under which fieldname, in the criteria range, what the formula should be etc)

Expand|Select|Wrap|Line Numbers
  1. SELECT DISTINCTROW Spend.PcCode, Profit_centre.[Profit centre name], Spend.YEAR, Spend.MONTH, Sum(Spend.[Total spend DDP/EUR]) AS [SumOfTotal spend DDP/EUR], COGS.[5999], COGS.[1300]

I hope you can help me
Mar 19 '07 #1
1 1597
MMcCarthy
14,534 Expert Mod 8TB
Something like this ...

Expand|Select|Wrap|Line Numbers
  1. SELECT Spend.PcCode, Profit_centre.[Profit centre name], Spend.YEAR, Spend.MONTH, Sum(Spend.[Total spend DDP/EUR]) AS [SumOfTotal spend DDP/EUR], COGS.[5999], COGS.[1300],
  2. Format([SumOfTotal spend DDP/EUR] /COGS.[5999], "Percent") As PercentSpend
  3. FROM TableName
  4. GROUP BY Spend.PcCode, Profit_centre.[Profit centre name], Spend.YEAR, Spend.MONTH, COGS.[5999], COGS.[1300]
  5.  
Mar 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: James M via SQLMonster.com | last post by:
Hi, I'm trying to count field login totals for users which updates another field in another table. Which is the most efficient method? I don't want to use a standard query as it will take too...
0
by: RJN | last post by:
Hi I have a main report and a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be evaluated after the formula in the main...
0
by: RJN | last post by:
Hi Sorry for posting this message again. I have a main report and a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be...
0
by: rjn | last post by:
Hi I have a main report in which I have inserted a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be evaluated after the...
1
by: dzemo | last post by:
I need to implement formula syntax checker (like crystal reports formula field or something like than) Like this it should be : I have tree list with some fields which user can ad to formula...
3
by: Mike | last post by:
Hi, I have three tables in the following structure (simplified): Table 1: Containing the customers ------------------------------------------------- create table Customers ( int...
2
by: dr.s.khazaee | last post by:
Dear friends: There has been a problem for months in my mind.Only if any1 can help me some keywords for search I will be very thankful. For example I want to write a program to solve an equation.I...
0
denny1824
by: denny1824 | last post by:
I have a crystal report that someone else wrote and already has a Formula Field if Criteria then (Count ({FirstField},{SecondField}) / Count ({FirstField})) When the Criteria is true, this...
0
by: =?Utf-8?B?dGlnZXJsaWxlaWdo?= | last post by:
I have no experiece when it comes to Excel. So could please explain to me how to enter in a formula.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.