Answers.Body: <p>I was able to create the search, thanks to the input of petednz.</p>
  <p>First, create a data segmentation for the age brackets, like so:</p>
  <p><a href="https://i.sstatic.net/4zIzN.png" rel="noreferrer"><img src="https://i.sstatic.net/4zIzN.png" alt="Data segment for age brackets" /></a></p>
  <p>Next, you can use the data segment in the group by clause of the query, like so:
  <a href="https://i.sstatic.net/29bJf.png" rel="noreferrer"><img src="https://i.sstatic.net/29bJf.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-23T18:39:57.117Z
Answers.Text: Good on you for doing the write up for others.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-09T13:26:37.660Z
Answers.Text: Coleman covers this here https://www.youtube.com/watch?v=1Tt2Puupip0 about 12 minutes in.
Answers.UserDisplayName: Tony Horrocks
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-23T13:25:28.633Z
Answers.LastActivityDate: 2022-12-23T13:25:28.633Z
Answers.UserDisplayName: cray146
Answers.Body: <p>I think the answer to this is to use Data Segmentation which is a feature added in very recent releases.</p>
  <p>The workflow is something along the lines of</p>
  <ul>
  <li>create a bunch of Data Segments (eg one for each age group)</li>
  <li>add these segments as values in the Search Kit</li>
  </ul>
  <p>(i will ask my colleague to explain in a bit more detail)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-22T18:18:02.057Z
Answers.LastActivityDate: 2022-12-22T18:18:02.057Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I wonder if it is possible in search kit to create a query that counts individuals by age bracket. A count by age is very straightforward but I don't know how to define age brackets like 0-10, 10-20, etc.</p>
  <p>Thanks!</p>
  <p><a href="https://i.sstatic.net/Vofo9.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Vofo9.png" alt="enter image description here" /></a></p>
  
Tags: <searchkit>
Title: How to count individuals by age bracket?
ThreadText: # How to count individuals by age bracket?
  
  (Asked by: username_0 on 2022-12-22)
  
  I wonder if it is possible in search kit to create a query that counts individuals by age bracket. A count by age is very straightforward but I don't know how to define age brackets like 0-10, 10-20, etc.
  
  Thanks!
  
  [![enter image description here](https://i.sstatic.net/Vofo9.png)](https://i.sstatic.net/Vofo9.png)
  
  **Tags:** searchkit
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2022-12-22. Score: 3 | Accepted answer
  
  I think the answer to this is to use Data Segmentation which is a feature added in very recent releases.
  
  The workflow is something along the lines of
  
  * create a bunch of Data Segments (eg one for each age group)
  * add these segments as values in the Search Kit
  
  (i will ask my colleague to explain in a bit more detail)
  
  
  ---
  
  ### Answer by username_0 on 2022-12-23. Score: 8
  
  I was able to create the search, thanks to the input of petednz.
  
  First, create a data segmentation for the age brackets, like so:
  
  [![Data segment for age brackets](https://i.sstatic.net/4zIzN.png)](https://i.sstatic.net/4zIzN.png)
  
  Next, you can use the data segment in the group by clause of the query, like so:
  [![enter image description here](https://i.sstatic.net/29bJf.png)](https://i.sstatic.net/29bJf.png)
  
  > **Comments:**
  > **username_1**: Good on you for doing the write up for others.  
  > **username_2**: Coleman covers this here https://www.youtube.com/watch?v=1Tt2Puupip0 about 12 minutes in.  
  
  ---
  
  