Answers.Body: <p>So we managed to accomplish this. 
  - I used a module called views_aggregator to display the sum total duration of all the activities for each contact 
  - I then created another view and did the same but filtered the results to only show contact with a total activity duration > x and rewrote the results to only display a badge
  - then used the module views_field_view to display the badge from view2 next to the corresponding name in view1</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-20T23:41:51.483Z
Answers.LastActivityDate: 2017-07-20T23:41:51.483Z
Answers.UserDisplayName: Yossi
Answers.Body: <p>This is more of a Drupal question - you can do what you're looking for with the <a href="https://www.drupal.org/project/views_conditional" rel="nofollow noreferrer">Views Conditional</a> module.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-19T00:03:43.670Z
Answers.Text: Thanks for recommending that module. It does trigger based on the duration field but NOT based on the sum of the duration field. 
  I am using views_aggregator to give me a total sum of all activity durations.
  Any other ideas to work around this?
Answers.UserDisplayName: Yossi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-19T14:44:49.843Z
Answers.Text: Consider either the [Computed Field](https://www.drupal.org/project/computed_field) module to create hidden fields to trigger on, or writing a module that injects 2-3 lines of jQuery?
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-18T07:21:37.700Z
Answers.LastActivityDate: 2017-07-18T07:21:37.700Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I am trying to build a view that displays each CiviCRM contact and the sum of the duration of all their recorded activities. 
  I would also like to distinguish contacts in the view whom's duration sum is greater than x minute either with an icon or different color or font. </p>
  
  <p>Any thoughts on how I can accomplish this?</p>
  
Tags: <drupal-views>
Title: Aggregate of activity duration in Drupal Views
ThreadText: # Aggregate of activity duration in Drupal Views
  
  (Asked by: username_0 on 2017-07-18)
  
  I am trying to build a view that displays each CiviCRM contact and the sum of the duration of all their recorded activities.
  I would also like to distinguish contacts in the view whom's duration sum is greater than x minute either with an icon or different color or font.
  
  Any thoughts on how I can accomplish this?
  
  **Tags:** drupal-views
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2017-07-20. Score: 2 | Accepted answer
  
  So we managed to accomplish this.
  - I used a module called views\_aggregator to display the sum total duration of all the activities for each contact
  - I then created another view and did the same but filtered the results to only show contact with a total activity duration > x and rewrote the results to only display a badge
  - then used the module views\_field\_view to display the badge from view2 next to the corresponding name in view1
  
  
  ---
  
  ### Answer by username_1 on 2017-07-18. Score: 2
  
  This is more of a Drupal question - you can do what you're looking for with the [Views Conditional](https://www.drupal.org/project/views_conditional) module.
  
  > **Comments:**
  > **username_0**: Thanks for recommending that module. It does trigger based on the duration field but NOT based on the sum of the duration field.  I am using views_aggregator to give me a total sum of all activity durations. Any other ideas to work around this?  
  > **username_1**: Consider either the [Computed Field](https://www.drupal.org/project/computed_field) module to create hidden fields to trigger on, or writing a module that injects 2-3 lines of jQuery?  
  
  ---
  
  