Views Calc

Events happening in the community are now at Drupal community events on www.drupal.org.
karens's picture

I have a views_calc module in my sandbox that allows you to total a table of views fields across by row or down by columns. You can choose to SUM, COUNT, or AVERAGE the total. It includes a plugin theme that is more spreadsheet-like (right justifies numeric data, highlights and underlines the total columns, etc.)

I have it on a production site now at http://www.everbloom.us/home/results/views. On that page you see a summary view of cck nodes that contain fishing tournament results. When you select one, you see a view filtered by the argument for that date that totals the number of fish caught and the weight.

If anyone else is interested, you can find it in my sandbox at http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/karens/

If it seems useful, I can set it up as a project for further enhancement.

Comments

You are a champion. This

gordon's picture

You are a champion.

This gives me a real incentive to get the views intergration complete in E-Commerce.

Thanks.

--
Gordon Heydon

Nice

sime's picture

If it seems useful...

Nice understatement, KarenS. :-)

I've just dusted off my BusinessObjects/COGNOS hat. Is that drill-down/through behaviour easily configured?

.s

The drill down comes from

karens's picture

The drill down comes from creating a view that uses arguments for whatever value you want to filter on. Set up the argument to show a summary listing when you create the view. That will give you the effect you see on the page I pointed you to.

Views Calc doesn't get involved in any of that, that is all standard views stuff. Views Calc jumps in right after the views query has been executed and manipulates the results to calculate and format the totals, so you need to first create a view that produces the results you want to calculate.

Tabs

Anonymous's picture

All right, so I get the arguments bit, but how did you have it filter by date? Or are you using a custom date field, as opposed to event?

And how did you create the tabs to have multiple filters?

Thanks for any info you can provide!

Whoops

hairylunch's picture

Whoops, that was me who posted the above question . . . forgot to login!

hmmm i'm having trouble

mrtunes's picture

hmmm i'm having trouble figuring out what sort of argument i should be using to get rid of displaying all the values before they get summed. i just want to show the totals cause the finer math is done on another page. great project btw!

timesheet

edrex's picture

Thanks Karen, I can use this for totaling timesheets on my project management site.

More calculation types

Rosamunda's picture

Can be added more calculations?
ie. percentage?, interest rate?

Excellent module BTW!

Only total

pareen's picture

like mrtunes, I also want to show just the sum and not the entire table / values.

Is there a way to accomplish that with Views calc?

Ubercart order: Total

awsfanboy's picture

hi there i want to use this for calculate the SUM of "Ubercart order: Total" please help me how to do it

thanks

Views Developers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: