Thanks Dan.

I figured it out.  There were a lot of entries where there was only one 
decimal place.  ie - 54.8 USD   100.0 USD etc.  (1500 entries).

I changed all of those to two decimals and the bean-query results now show 
two decimal places.

Why would Beancount do that though?  If the items it brings up have two 
decimal points worth of information why would it truncate that?  I would 
understand if ALL of the transactions had one decimal point but it doesn't 
make sense for transactions that do have two decimal points of data.   I'm 
clearly not understanding something here.

-Chris

On Thursday, September 4, 2025 at 12:51:21 PM UTC-4 [email protected] wrote:

> On 04/09/25 13:46, CD wrote:
> > Prior to today I have mostly used fava to do queries but have been 
> > experimenting more with the command line.
> > 
> > For some reason all of my output in the command line is rounded to 1 
> > decimal place even though the actual transactions have two decimal 
> > places.
>
> This is not the intended behavior.
>
> When formatting a table, beanquery rounds the numerical values in 
> columns of type `position` to the most common number of decimal digits 
> for the values in the column. `sum(position)` has type `inventory` but
> the same applies for each currency in the inventory.
>
> Therefore, the only explanation for the behavior you observe, is that 
> the most common number of decimal digits for the values to be displayed 
> is 1 and not 2.
>
> You do not provide enough information to help you further. For this we 
> would need the exact query you are running and a minimum ledger that 
> results in the problem you describe.
>
> > This doesn't happen when I run queries from python scripts.
>
> The table formatting code is only used when displaying results via the 
> beanquery shell.
>
> Cheers,
> Dan
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/06d75128-3345-42a7-9899-1c679e55d010n%40googlegroups.com.

Reply via email to