Consecutive Years of Giving & Sequential Value Groups

A person's length of consecutive giving can be queried upon using the special system join of Sequential Value Groups. This join allows for the identification of a data point (such as a gift's year) that can then be used to count the number of times that it appears consecutively (such as 2016, 2017, 2018, 2019, 2020), as well as the minimum and maximum range of the consecutive span (such as 2016 and 2020).

For example, an institution might want to query on donors who have given consecutively for at least 5 years, displaying the number of consecutive years given as well as the start and end date for the range. This type of query can be configured in two primary steps:

  • Adding a subquery filter based on consecutive giving
  • Adding a subquery export that returns the details of the consecutive giving

Ultimately, the output of this type of query will resemble this example:

Sequential_Value_Join_-_Output.png

Filter the Query Base

The first step to identifying donors who have given consecutively for at least 5 years is to establish which data point will be looked at, sequentially. In this example, the data point to be counted sequentially is the  year of the gift.

To create and customize this join:

  1. Add a Subquery Filter.
  2. Name the join something that is user-friendly, such as "5 or More Years of Consecutive Giving."
  3. Leave the Aggregate as Exists.
  4. Click Join to add a new join to this subquery part.
  5. In the dialog box, scroll down under the System header and select Sequential Value Groups.

    Sequential_Value_Join.png

  6. The next step is to determine which data element should be used for this sequential value join. After clicking Continue, an export must be added. This export becomes the item that Slate will look at to determine if the values are consecutive.
  7. Because in this example a gift's year is the item being counted sequentially, a join must be added to the Gift table in order to add return the date of the gift. Select Join and choose Gifts.
  8. Add the export for Gift Date.

    Sequential_Value_Join_-_Gift.png

  9. In its standard formatting, the Gift Date export will return a relatively unique value (date + time). To count the sequential years of giving, this export needs to be formatted in a way that only returns the elements to be counted consecutively - in this case, only the year element should be returned. Double Click the Gifts Date export and change the Format Type to "Date."
  10. Enter "yyyy" for the Format Mask and click Save.

    Sequential_Value_Join_-_Gift_Date_Format.png

  11. Click Save on the Sequential Value Groups part.
  12. With the join added, insert filters as appropriate. Click Filter and select one of the filters from the Sequential Value Groups section - such as Count

    Sequential_Value_Join_-_Filter_Options.png

  13. Configure the Count setting to be >= 5. Click Save.

    Sequential_Value_Join_-_Filter_5_Years.PNG

  14. Save the subquery filter.
Add the Exports

Once the number of records has been appropriately filtered, the next step is to show the details about the years of consecutive giving as part of a subquery export. To configure the export to return the count of the consecutive year of giving, the first year in the series, and the most recent year in the series, follow the steps below:

  1. Add a Subquery Export.
  2. Repeat the steps outlined above to join in a Sequential Value Group that references a gift's year. This ensures the exports will be displaying the same data as the overall filter criteria for the query. 

    Sequential_Value_Join_-_Export_Filter.P

  3. With the join added, select which exports to include. Count, Min, and Max are available as exportable elements for the series. 

    Sequential_Value_Join_-_Direct_Exports.png

  4. These exports can be arranged and literals can be added to provide context to the numbers that will be returned:

    Sequential_Value_Join_-_Export_Arrangement.png

  5. Provide a name to the subquery export part and click Save.
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.