Paul Stansell <paulstans...@gmail.com> writes:

> The header row that contains 2025-01 is supposed to represent a date in the
> YYYY-MM format, not a number, so I expected org to sum just the numbers to
> get 30, and not to include the first part of the date in the sum.  I
> checked if org was evaluating 2025-01 = 2024 before summing down the
> column, but it wasn't.  Here are some more examples of unexpected behaviour
> (with the first column giving the expected behaviour)
> |----+----+-----+-----+-----|
> | A1 | 1A | .1A | +1A | -1A |
> |----+----+-----+-----+-----|
> |  1 |  1 |   1 |   1 |   1 |
> |  1 |  1 |   1 |   1 |   1 |
> |----+----+-----+-----+-----|
> |  2 |  3 | 2.1 |   3 |   1 |
> |----+----+-----+-----+-----|
>
> It seems that, if the string used as the column name in the header begins
> with a number, the numeric part of the string is included in the sum.

In other words, value handling in table formulas is not the same with
`org-table-sum'.

Indeed, `org-table-sum' uses `org-table--number-for-summing'.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to