I have a site that is using Drupal 6.20 and views calc 6.x-1.3. I have a view (view A) that has several columns and I'm using views calc to add up the sum of the Bushels of the column. I have another view (view B). I would like view B to grab the Bushels sum from view A. Is this possible, if so how do I grab that Bushels sum from view A and include it in view B?

Comments

johnnygg’s picture

i have very same problem. so frustrating, nearly have functionality i want if only i could grab the 'sum total' from a different view but alas it's not viable :(

waltf’s picture

subscribe

manimal’s picture

+1 subscribing

hjulien’s picture

+1 Does anyone know of a workaround - such as doing the calc in one view and embedding it in the second one?

kevin.mcnamee@mailbox.org’s picture

subscribing

epoitras’s picture

subscribing

Ashford’s picture

Views_Calc is a super module, but even it has limits to what it can do. Your best option is to create a custom module to run your queries, process the results, and generate the block content.

I had a complex query that I worked for a week to get the Relationship, Filter, Argument, and Fields all set to display the list I wanted. Unfortunately, Views_Calc could not process the math after I added the Relationship value. The custom module took me 4 hours to set up. Most of that time was reading and researching how to do things. I am a volunteer web master for a nonprofit organization I belong to and not a web professional. The quick part was that I could grab the queries from the View by clicking the Preview button.

Ashford’s picture

Not sure how you can use it, but I did find this in some of my old notes. It was long ago and I cannot remember any details of what I was doing. The only other thing I wrote down was that I copied the line from Views_Calc, tested it in one of my template files and it worked. I never used it, so I cannot explain anything further.

<?php
print $totals[SUM]['my_field_name'];
?>

Do not try it on your live site; use a local site on your home computer to test it first.

ayesh’s picture

Subscribing

karens’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

The D6 version is no longer supported.