473,626 Members | 3,974 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Add a Mark-up Percentage field to a query

1 New Member
I figured out how to calculate the Profit field by subtracting the cost from the selling price. Now I need to add another field to my query that will calculate the Profit divided by the cost. I keep getting errors.
Oct 20 '17 #1
2 2207
MikeTheBike
639 Recognized Expert Contributor
Hi

I think we need to see what you have done to calculate the net profit so we have an idea what the error may be.

Generally it would be something like
Expand|Select|Wrap|Line Numbers
  1. PctNetProfit:([Selling Price]-[Cost])/[Cost]*100
You should also check that [Cost] is not zero or null before doing the calculation.

HTH


MTB
Oct 20 '17 #2
NeoPa
32,567 Recognized Expert Moderator MVP
Also known as GPM (Gross Profit Margin) this is typically calculated, in a query, as :
Expand|Select|Wrap|Line Numbers
  1. GPM:Round(IIf([Cost]=0,0,([SellingPrice]-[Cost])/[Cost]),4)
Multiplication by 100 is only used when displaying the value. This is better done using the format property. Percents can be displayed, and values are automatically shown as 100 x when shown as percent.
Oct 29 '17 #3

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

Similar topics

1
6993
by: Gx | last post by:
I have this form with the fields: * Product: (drop down combo box) with choices - X, Y * Amount: (currency ) * Balance (currency) I want to associate product X with the percentage amount of 50 %, Y with 10
5
4292
by: Javier | last post by:
I have a field type Date/Time that automatically defaults to Now(). I'm having a problem writing a query that will retrieve all the records for a specific date the user to enters when prompted. I could retrieve all the records for a specific date if I hard-code the date into the query, but not if I want to prompt the user. Has anybody else experienced this? Does anybody have any suggestions?
4
2105
by: bob hicky | last post by:
I have two tables (RadiationOncologists and EvaluationEntry) and forms for each of the two. My problem is that I have a text box in the RadiationOncologists form that is called Number. This field needs to dynamically count each instance of a certain doctors name from the EvaluationEntry table which is RADLNAME and return the total for each doctor listed as there record in the RadiationOncologist Form appears. I can do a count of all...
18
2175
kcdoell
by: kcdoell | last post by:
Hello: I have two fields on a table that is displayed on my continous form. GWP = Number Binding Percentage = Text (a value list of 25%, 50%, 90% & 100%) I have a unbound text box that I placed in the footer and in the control source I wrote the following:
5
1818
by: aewhale | last post by:
I have a monitoring script which I am trying to better understand. One of the queries is built as follows: # delete any rows that expired more than a year ago my $rows = $dbh->do("DELETE FROM table1 WHERE last_update < NOW() - INTERVAL 2 YEAR "); What is the NOW() function, and what Perl module does it come in? Is there more functions?
2
5788
by: MRamaLakshmi | last post by:
Hi, Do any body have validation script for a textfield which is a percentage field where i should be able to enter values between 0.0 to 100.0 if user tries to enter any other value it should not accept.It should not even allow the user to enter. I am in a urgent requirement. Please any body help me out from this. Thanks,
4
2489
by: Jimmy Jones | last post by:
Hi, My problem is that I cannot run make-table-query with "attachment" field... Is there any workaround? I need to find a way to move attachments between tables together with regular data. Regards, Jimmy
2
3137
by: thangarai | last post by:
how can i show a field in gridview as percentage,? that is 12 should be displayed as 12% and 12.4 should be as 12.4%
1
1037
by: webbeacon | last post by:
I have a query that searches 3 multivalue lookup fields (Impact, Implementation and Owners) based on input from 3 combo boxes in a form. When I run the form, it doesn't recognize that the 3 lookup fields exist and asks me to Enter Parameter Values (once for each of the 3 lookup fields). If I click through those and then choose an option from one of the combo boxes and resubmit the query, the datasheet in my form returns 0 results (after...
0
8199
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8638
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7196
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4092
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2626
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.