PatronManager Help

How to Create "Distance from" Reports

Updated on

Use this link to share with your colleagues:

How to Create "Distance from" Reports: https://help.patronmanager.com/a/2093658

Wouldn't it be great if you could run a report to show all Accounts or all Contacts within a certain distance from a location for a mailing or a targeted offer? Or maybe you want to run a report to see how far patrons travel to attend your events?

With a little setup and formulas, you can do just that! In this article, we'll show you:

  1. How to turn on geocodes for addresses
  2. How to create a report type to use geocodes
  3. How to create formulas in reports to check distances

Let's get started!

1. Turn on geocodes

You'll only need to do this step once! After this has been done in your account, you won't have to do this again.

Expand or collapse content Let's do this!

1.1. Go to Setup

Setup

1.2. Find and select Data Integration Rules

Data Integration Rules

1.3. Click into the rule(s) you wish to enable

Geocodes

You can select:

  1. Geocodes for Account Billing Address: If you want to use the Account's Billing Address as the address to measure
  2. Geocodes for Account Shipping Address: If you want to use the Account's Shipping Address as the address to measure
  3. Geocodes for Contact Mailing Address: If you want to look at the Contact's address to measure

Ignore "Geocodes for Lead Address" because Leads aren't used in PatronManager!

1.4. Click Activate

Activate

1.5. If prompted, click OK

OK

2. Create a Report Type for geocodes

You'll only need to do this step once! After this has been done in your account, you won't have to do this again.

Once you've turned on geocodes, you'll need to make them available on reports via a Report Type.

Here we'll show you how to create a new report type that can use geocodes, but if you have a custom report type based on Accounts or Contacts, you can add the different latitude and longitude fields for addresses to your custom report types!

The fields you'll want to add (based on what you selected earlier) are:

  • Billing Latitude (if you enabled "Geocodes for Account Billing Address")
  • Shipping Latitude (if you enabled "Geocodes for Account Shipping Address")
  • Mailing Latitude (if you enabled "Geocodes for Contact Mailing Address")
Expand or collapse content Time to make a new one!

2.1. Go to Setup

Setup

2.2. Find and select Report Types

Report Types

2.3. Click New Custom Report Type

New Custom Report Type

2.4. Set up the Report Type

Report Type Details
  1. Primary Object: Select Accounts
  2. Display Label: Give the report type a recognizable name, like "Accounts & Contacts with Geocodes"
  3. API Name: This automatically fills
  4. Description: Enter a description to help others know what this report is for
  5. Store in Category: Other Reports
  6. Status: Deployed
  7. Next

2.5. Click to relate another object

Click to relate another object

2.6. Find and select Contacts

Find and select Contacts

2.7. Save

Save

3. Create distance formulas in reports

Now that geocodes are available in your Report Type, you can use them in reports!

We'll use a row-level formula for this!

3.1. From the Reports tab, click New Report

New Report

3.2. Find and select the Report Type you created

Find and select the Report Type

3.3. Start Report

Start Report

3.4. In the Filters pane, adjust the Filters to what you need

Adjust Filters

3.5. In the Outline panel, adjust the columns and groupings to what you want to see

Adjust Columns and Groups

3.6. Still in the Outline pane, expand the Columns options

Columns options

3.7. Add Row-Level Formula

Add Row-Level Formula

3.8. Create the Row-Level Formula Column

Row-Level Formula Column
  1. Column Name: Give the column a descriptive name, like "Distance from Billing Address to Venue"
  2. Description: Further describe the column, like "Miles from the Account Billing Address to the Monarch Theatre"
  3. Formula Output Type: Number
  4. Decimal Points: Set as specific as you wish; defaults to 2

3.9. Create the Formula

To make the Formula, we'll need to gather the latitude and longitude of the address you wish to use as the constant. This is most likely the location of an event, your venue, etc.

Expand or collapse content If you need to find the latitude and longitude of the address, we have instructions using Google Maps
3.9.1. Go to Google Maps
3.9.2. Enter the address you wish to use
Address entry
3.9.3. In your browser's URL bar, grab the latitude and longitude

This appears in the URL after the at sign (@) and is separated by a comma (,).

In the screenshot above, the latitude and longitude is: 40.7611217,-73.9707703

The exact formula you'll use depends on the address field for the Account or Contact you wish to use, and we have copy-and-pasteable formulas below:

  • To use the Account Billing Address: DISTANCE(GEOLOCATION(Account.BillingLatitude,Account.BillingLongitude), GEOLOCATION(INPUT LOCATION LATITUDE AND LONGITUDE), 'mi')
  • To use the Account Shipping Address: DISTANCE(GEOLOCATION(Account.ShippingLatitude,Account.ShippingLongitude), GEOLOCATION(INPUT LOCATION LATITUDE AND LONGITUDE), 'mi')
  • To use the Contact Mailing Address: DISTANCE(GEOLOCATION(Contact.MailingLatitude,Contact.MailingLongitude), GEOLOCATION(INPUT LOCATION LATITUDE AND LONGITUDE), 'mi')
Formula

In all of the formulas above, replace "INPUT LOCATION LATITUDE AND LONGITUDE" with the location of your event or venue's latitude and longitude.

3.10. Apply

Apply

A new column will appear in your report showing the distance in miles from the address in PatronManager and the address you selected

New Formula Column

Don't forget to Save & Run the report once you're done!

Previous Article How to Report on Entry Ticket Types
Next Article All About CRM Snapshots
Still Need Help? Continue to the Client Community