[GNC] Report seems to pull wrong amount from transaction

Derek Atkins derek at ihtfp.com
Fri May 15 14:12:46 EDT 2020


Art,

Art Chimes <artsonline at gmail.com> writes:

> My report apparently uses the number of shares x the price per share
> to compute the dollar amount. Possibly the dollar value of the
> transaction is not stored in the user's data file but rather is
> computed on the fly? The incorrect dollar figure in the report was the

Within a transaction, GnuCash stores the # shares and the total value of
those shares.  The "share price" is a computed value.

Having said that, GnuCash also stores a "PriceDB", which contains the
various share prices and exchange rates at various points in time.

Using this, you can see exactly how much you spent on the purchase of
the shares, and then multiplying by the PriceDB entry you can see the
current value of those shares.

> product of the correct number of shares times an incorrect share
> price. But the share price in the account register is correct. So
> where is the incorrect share price coming from?

My guess is the PriceDB.  Or your "Price Source" selection in the report
options.  The "Weighted Average" is almost always the incorrect choice.

[snip]
> Anyway, I quickly determined that the incorrect dollar amount entered
> was the result of multiplying the number of shares times the share
> price on Jan 31 — the closest date in the Price Database. I manually
> added the correct share price for Jan. 29. And now the report has the
> correct dollar amounts.

There you go. :)

> Problem solved. But I wonder if I should file an enhancement request
> that reports using a calculated value based on a close but not exact
> share price should be flagged (with an asterisk and footnote?) as
> questionable.

It is certainly reasonable to flag a report where the pricedb entries
are off by more than a few days.

> Thanks all who chipped in to help solve this mystery Great community here!
>
> Art

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-derek
-- 
       Derek Atkins                 617-623-3745
       derek at ihtfp.com             www.ihtfp.com
       Computer and Internet Security Consultant


More information about the gnucash-user mailing list