Org Percent Giving

This script runs from the OrgSearch BlueToolbar. It shows each organization in the search, with the percentage of each organization’s members where someone in the family gives. This way, if either a husband or a wife gives (regardless of Joint giving option) That family unit will be counted as a giver. The script looks back 365 days and considers all funds.

The counts are the number of family units, not individuals.

The comment at the top of the script ensures that this report can only be run by a Finance user.

The recommended name is OrgPercentGiving

Sample Report

Use the following code to Create the SQL Script. See How to create a SQL Script.

;WITH orgfamilies AS (
    SELECT p.FamilyId, om.OrganizationId
    FROM dbo.OrganizationMembers om
    JOIN dbo.People p ON p.PeopleId = om.PeopleId
    JOIN dbo.SplitInts(@OrgIds) i ON i.Value = om.OrganizationId
    WHERE ISNULL(om.Pending, 0) = 0
    AND om.MemberTypeId NOT IN (311)
    GROUP BY p.FamilyId, om.OrganizationId
), givers AS (
          ,CAST(g.FamGive AS INT) isgiver
    FROM orgfamilies fo
    LEFT JOIN dbo.FamilyGiver(@fd, @td, NULL) g ON g.FamilyId = fo.FamilyId
), summary AS (
    SELECT o.OrganizationId
        ,SUM(g.isgiver) Givers
        ,SUM(1-g.isgiver) NonGivers
        ,COUNT(*) Units
    FROM givers g
    JOIN dbo.Organizations o ON o.OrganizationId = g.OrganizationId
    GROUP BY o.OrganizationId, o.OrganizationName
SELECT s.OrganizationId
    ,CONVERT(FLOAT, s.Givers) / s.Units * 100 GivePct
FROM summary s
ORDER BY s.OrganizationName

Latest Update


Modify image link with secure protocol.