Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to get a total count of the results using Views. Looking at this link, Count results in Views using aggregation, I use aggregation, but Views counts each row as 1. For example, this is what I get:

TITLE         Results
"A title"     1
"A title2"    1
"A title3"    1
etc...

I want it to be

Title
"A title"
"A title2"
"A title3"

Results: 3

Any way to do this in Views? If not, is there a way I can weak the current Views SQL or its output instead of having to write my own module and SQL query from scratch?

share|improve this question
up vote 8 down vote accepted

Add a Global: Result summary field to the footer. There is no need to turn on aggregation.

share|improve this answer
1  
I think you mean Global: Result summary not "Global: results" in list of things offered in Footer. So, in the View edit screen, select 'Add Footer' (middle column of the settings) then choose Global: Result summary And then choose from the various @ prefixed variables regarding what you'd like to display. – therobyouknow Apr 1 '14 at 9:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.