Answers.Body: <p>This technique will work for any related entity (activities, event registrations, etc).
  The basic steps for obtaining the latest Contributions for a contact are:</p>
  <ol>
  <li>In SearchKit, search for contacts</li>
  <li>With Contributions</li>
  <li>Group By Contact ID
  <a href="https://i.sstatic.net/HlIDVPVO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/HlIDVPVO.png" alt="enter image description here" /></a></li>
  <li>For every Contribution-related field you add to the Select Fields, (contribution date, amount, etc) choose &quot;First&quot; as the aggregate function, and Order By Contribution date, descending.
  <a href="https://i.sstatic.net/Gqrz16QE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Gqrz16QE.png" alt="SearchKit" /></a></li>
  </ol>
  <p>This will pick the latest contribution for each row.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-09-23T12:40:32.197Z
Answers.Text: Ah, thank you. I should have worked that out. Saves a lot of faffing in unfeasibly large Excel files.
Answers.UserDisplayName: Michael FORWARD
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-09-23T11:38:16.893Z
Answers.LastActivityDate: 2024-09-23T18:21:05.207Z
Answers.LastEditDate: 2024-09-23T18:21:05.207Z
Answers.UserDisplayName: Coleman
Body: <p>I must be missing something, but there must be a way of outputting the latest contribution for a contact in search results (particularly if there is a mailmerge token for it), but I can't seem to find it.</p>
  
Tags: <contributions><search><searchkit>
Title: Output Latest Contribution
ThreadText: # Output Latest Contribution
  
  (Asked by: username_0 on 2024-09-23)
  
  I must be missing something, but there must be a way of outputting the latest contribution for a contact in search results (particularly if there is a mailmerge token for it), but I can't seem to find it.
  
  **Tags:** contributions, search, searchkit
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-09-23. Score: 3
  
  This technique will work for any related entity (activities, event registrations, etc).
  The basic steps for obtaining the latest Contributions for a contact are:
  
  1. In SearchKit, search for contacts
  2. With Contributions
  3. Group By Contact ID
     [![enter image description here](https://i.sstatic.net/HlIDVPVO.png)](https://i.sstatic.net/HlIDVPVO.png)
  4. For every Contribution-related field you add to the Select Fields, (contribution date, amount, etc) choose "First" as the aggregate function, and Order By Contribution date, descending.
     [![SearchKit](https://i.sstatic.net/Gqrz16QE.png)](https://i.sstatic.net/Gqrz16QE.png)
  
  This will pick the latest contribution for each row.
  
  > **Comments:**
  > **username_0**: Ah, thank you. I should have worked that out. Saves a lot of faffing in unfeasibly large Excel files.  
  
  ---
  
  