Sum with decimal's way off course

Ace71425

Board Regular
Joined
Apr 20, 2015
Messages
130
Hello...I have a couple querys that do some math and then expound upon that math...basically here's the point im stuck at

Everything works GREAT up to the last query, I have a column with decimals

.09
.04
.02

Now when you add these up say on a calculator you get .15...when I do this in a sum column of a query it's WAY off base... like the example above would be something like .67 which is like what the hell...I've tried messing with the formatting and with the formatting of the original fields that the queries are doing the math on changing them to fixed and double and single and everything you can think of...any ideas?
 
Sorry, I misunderstood the intent of your statement. I think we are both saying that the second query is using the first as a table and joining that to other tables or queries. I would not be surprised if there are no duplicate records in the first query, but there are in the second. We both seem to be saying the joins are probably the culprit
You have several joins between pairs of tables, and I suspect that is causing duplicate records
My advice was intended to ensure the duplicates were not comming from the first query. Hope that explains my previous comment.
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Agree with Micron. Write a query to return just the raw data that is being summed, rather than the sum itself. Then you can see "what" you are summing and correct any errors so that the data being summed is correct. Once that is done, it is as Joe pointed, out, just wrap it all in a sum function: Select Sum(MyExpression) AS Total From MyQuery.

Your queries posted are too complicated for anyone to be able to quickly give an answer without more information such as sample data and explanation of what the fields are all for and what the joins are meant to accomplish.
 
Upvote 0

Forum statistics

Threads
1,221,834
Messages
6,162,268
Members
451,758
Latest member
lmcquade91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top