For some column, when all values are 0 or 0.00, totals row are empty.
it's because type of this values are string (I don't no why).
In function theme_views_calc_ui_table (file theme.inc) line 179 change

if (!empty($row->$field_alias) || (isset($row->$field_alias) && $row->$field_alias === 0)) {

to

if (!empty($row->$field_alias) || (isset($row->$field_alias) && $row->$field_alias == '0')) {

Seb

Comments

zedzed’s picture

In last dev version (09/04/24) it's line 186.

higherform’s picture

Suggestion given by OP did not fix the issue for us.

Giving a UI option to display specific empty text or value on COUNT 0, views returning no rows, etc. would be a great new feature for views calc.

Using 6.15 and Views Calc 6.x-1.3 to COUNT a decimal CCK field.

miro_dietiker’s picture

Status: Active » Fixed

Changed this code fundamentally recently.

Values that are undefined are now NULL and no more 0.
So you can now differ between 0 results (which are shown) and NULL that are undefined.

Views Calc shows SUM(col)=0 now correctly as an existing sum.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.