Turn a normal table like:

into this:

Instructions:

  1. Create a view and add fields to it as you normally would. Start by creating a normal table and make sure that works as you expect.
  2. Change the style type from 'table' to 'Views Calc table'.
  3. In the Views Calc table settings, mark which fields need calculations.

  4. Save the view.

Comments

sherabdorje’s picture

What may I do to have fields like the examples:
Content: Date
Content: Rank
etc.

I've tried to add a kind of field "content" but i didn't find it ¿?
It may be obvious but i don't know how to do it.

mylesorme’s picture

I assume by content you mean the body of the post...

The style options include the tick box "show details"

mylesorme’s picture

How do we create sub-totals by group

Lets say we have a table showing: school; number of volunteers

This is grouped by 'programme'

How do I get a sub-total for each programme - at the moment it just repeats the totals at the end of each group?

MrAdamJohn’s picture

Wondering the same thing ..
Looking into going about an approach here: admin/settings/views_calc

Any progress on your end mylesorme? (or anyone else?)

kk-mini-pw’s picture

Hi I have a table with several fields and grouping option. When I switch to Views Calc Table I get:
warning: Invalid argument supplied for foreach() in .....sites/all/modules/views_calc/theme.inc on line 178.

Is there any patch for this?
Thanks,
K.

SiteMaster.ServeLime.com’s picture

Hi there.

I seem to get a similar error - when using a Date field. (might be Date-specific ?)

Anonymous’s picture

I get the same error. I think I had enabled a relationship in one view and later took it out but the error remains.

shaynl’s picture

"warning: Invalid argument supplied for foreach()"…
Is it working with computed fields?

MikeBC’s picture

it went away for me once I created a calculated field in the view

fishfilet’s picture

In your example it shows a title for the calculated row like Count: 6 or Max: 15 How do I get this when I am calculating a row all I get is the value?

chrispane8’s picture

Hi,

is it possible to create a balance sheet with views calc; subtracting expenses from income?

Chris

willemt’s picture

I would need the same thing: Calculate the sum of one column=A, calculate the sum of another column=B and have a "grand total" (C=A-B) displayed. Possible?

willemt’s picture

How does this work when the view is configured to be displayed in several pages (as in maximum 10 entries displayed per page but there's over 100 entries alltogether)? Will the calculations be based on all 100+ entries or only those 10 entries displayed at that time?

Durrok’s picture

As seen at: admin/settings/views_calc

Anyone have an example of what can go in the calculation field?

Same for the custom function.

kevinkpierce’s picture

Is it possible to display calc results in a block? e.g. without the items being added being shown? For example, Projects are buildings that save energy. I can make a table showing total savings, but can I make a block to display only the total?

pvanerk’s picture

@kevinkpierce: Hi, any luck on creating a total in a block display. I am more or less looking for the same but then in combination with the option to select certain nodes in a view and get a total from that.

chrispane8’s picture

You have to uncheck "show details" (don't remember if it's the exact phrase.

Chris
http://www.neuros.fr

slcmayor’s picture

Hi all, does anybody know if it's possible to use Draggable Views in a Views Calc table? I have a 'drag to change order' feature on a standard views table, but really want to use this module to sum one column in the same table. When I tried this, the drag crosshair icon disappeared, and I got an SQL left join error. Thank you.

Yusadolat’s picture

Can you just write how to you in Drupal 7????

ggeeoorggee’s picture

Hi guys,
It is possible to make this:

http://www.reisswolf.net/services/physical-rms/reisswolf-abc/

Using this module ?

dvtalk’s picture

How would you escape special characters in a string, such as a dollar sign?