Answers.Body: <p>I would start with Participants as the base entity for the search and Group By Contact ID. That should give you what you need.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-11-13T21:51:36.290Z
Answers.Text: This also works, but you still need a count. thanks!
Answers.UserDisplayName: themak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-31T20:08:13.183Z
Answers.LastActivityDate: 2024-10-31T20:08:13.183Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>I think i figured it out.</p>
  <ul>
  <li>Search for Contacts (with required)</li>
  <li>Choose Contact Participants</li>
  <li>Group by fx Contact ID</li>
  </ul>
  <p>Make sure Contact ID, Sort Name, Event ID are columns.</p>
  <ul>
  <li><p>Click Search to check your work</p>
  </li>
  <li><p>Go to Select Fields, Change Event ID from fx to Count</p>
  </li>
  <li><p>Click search and save.</p>
  </li>
  </ul>
  <p>You can also add event title as a column and it will list out every event they have attended. (unfortunately the events are not clickable) You might have to change the fx to list in Select Fields and you can order my Unique Record (which is event id) or alphabetical order (Distinct Value)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-31T20:21:03.223Z
Answers.LastActivityDate: 2024-10-31T20:27:01.767Z
Answers.LastEditDate: 2024-10-31T20:27:01.767Z
Answers.UserDisplayName: themak
Body: <p>I want to generate a report that sorts our contacts by the number of events they have attended /  registered for. Is there a way to do that using search kit?</p>
  <p>Can you do the same for other variables?</p>
  <p>Thanks!</p>
  <pre><code>Name        # of Events Registered
  Doe, John     9
  Mark, James   7
  Jenna, Lady   3
  Smark, Sjshd  8
  Mama, Baba    5
  </code></pre>
  
Tags: <civireport><searchkit>
Title: How can you find the total number of events a contact attended?
ThreadText: # How can you find the total number of events a contact attended?
  
  (Asked by: username_0 on 2024-10-31)
  
  I want to generate a report that sorts our contacts by the number of events they have attended /  registered for. Is there a way to do that using search kit?
  Can you do the same for other variables?
  Thanks!
  Name        # of Events Registered
  Doe, John     9
  Mark, James   7
  Jenna, Lady   3
  Smark, Sjshd  8
  Mama, Baba    5
  
  **Tags:** civireport, searchkit
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2024-10-31. Score: 3 | Accepted answer
  
  I think i figured it out.
  
  * Search for Contacts (with required)
  * Choose Contact Participants
  * Group by fx Contact ID
  
  Make sure Contact ID, Sort Name, Event ID are columns.
  
  * Click Search to check your work
  * Go to Select Fields, Change Event ID from fx to Count
  * Click search and save.
  
  You can also add event title as a column and it will list out every event they have attended. (unfortunately the events are not clickable) You might have to change the fx to list in Select Fields and you can order my Unique Record (which is event id) or alphabetical order (Distinct Value)
  
  
  ---
  
  ### Answer by username_1 on 2024-10-31. Score: 2
  
  I would start with Participants as the base entity for the search and Group By Contact ID. That should give you what you need.
  
  > **Comments:**
  > **username_0**: This also works, but you still need a count. thanks!  
  
  ---
  
  