473,385 Members | 1,958 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,385 software developers and data experts.

How to write code for Median

29
I have a column that I what to show a negative number.
The equation for this is:
Unit Price % = ([Proposed Price]-[Current Price])/[Current Price]

With Numbers it would be:
Unit Price % = (378.62 - 382.44)/382.44

Which is -1%
But Access shows 0.00%

Can I please get help. Thank you
Apr 24 '07 #1
2 1414
ADezii
8,834 Expert 8TB
I have a column that I what to show a negative number.
The equation for this is:
Unit Price % = ([Proposed Price]-[Current Price])/[Current Price]

With Numbers it would be:
Unit Price % = (378.62 - 382.44)/382.44

Which is -1%
But Access shows 0.00%

Can I please get help. Thank you
Expand|Select|Wrap|Line Numbers
  1. Format((378.62 - 382.44)/382.44, "Percent")
OUTPUT:
Expand|Select|Wrap|Line Numbers
  1. -1.00%
Apr 24 '07 #2
Scldb
29
Expand|Select|Wrap|Line Numbers
  1. Format((378.62 - 382.44)/382.44, "Percent")
OUTPUT:
Expand|Select|Wrap|Line Numbers
  1. -1.00%
Sorry, I forgot to tell you this part. The equation that I'm trying display will be on a table. I created the table, now I'm using an update query to update that column into a percentage of the equation. Every row will have different numbers, but utimately, the equation should be the same. I have the proposed price and current price on this same table and every row has different proposed prices and current prices - hence the "([Proposed Price]-[Current Price]/[Current Price])" equation.

What you gave me "Format((378.62 - 382.44)/382.44, "Percent")" throws an error when I try to run the update query. So you have another suggestion?
Apr 24 '07 #3

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

Similar topics

4
by: Ross Contino | last post by:
Hello to all: I have been searching the web for examples on how to determine a median value in a mySQL table. I have reviewed the article at...
2
by: William Jiang | last post by:
Recently, I will write a database application to get the median value according to the grouped condition. maybe, just like the following. SELECT Max(a1) MaxValue, Median(a1) MedianValue FROM...
2
by: Hugo L. | last post by:
I really don't know how to calculate the median. Can anybody help me?
2
by: Bob | last post by:
I have been looking at the code for MedianFind(pDte As String) from the following thread from UtterAccess.com: "Finding Median average grouped by field" I have been able to get it to run using...
8
by: nick.vitone | last post by:
Hi, I'm somewhat of a novice at Access, and I have no experience programming whatsoever. I'm attempting to calculate the statistical median in a query. I need to "Group by" one column and find...
4
by: uspensky | last post by:
I have a table (cars) with 3 fields: VIN, Class, sell_price 101, sports, 10000 102, sports, 11000 103, luxury, 9000 104, sports, 11000 105, sports, 11000 106, luxury, 5000 107, sports, 11000
5
by: jonm4102 | last post by:
I'm trying to calculate the median of some numerical data. The data can only be found in a query (henceforth query 1) field I previously made, and I would prefer to calculate the median in a new...
4
by: georges the man | last post by:
hey guys, i ve been posting for the last week trying to understand some stuff about c and reading but unfortunaly i couldnt do this. i have to write the following code. this will be the last...
12
by: Scldb | last post by:
I have a textbox that shows Max, Min, Avg, and Median. I have the code for all expect Median. Can somebody please help. Example: For Max, I just went into the properties of the textbox, then in the...
7
by: Bhadan | last post by:
Hello, I have several jagged arrays which have been sorted. I'm trying to find the median of each array. Any tips appreciated. TIA. Bhads.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...

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.