Start your query: 
  1. Navigate to Analysis, then click on Information Library
  2. Click Add an ad-hoc query 
  3. Select the source view of Memberships and click OK
Add fields to Include records where:
  1. To filter your results on a specific Membership Program: In the left column, select Memberships. From the middle column, drag "Membership Program" to Include records where. Set this to be equal to the membership program you'd like to see visits for. 
  2. To filter your results on a specific status (such as Active, Lapsed, etc.): In the left column, select Memberships. From the middle column, drag "Status" into Include records where. Set this to be equal to or one of your statuses. 
  3. To find member visits: In the left column, expand Members, then expand Constituent, then expand Sales Orders. Under Sales Orders, decide which orders you would like to count as a visit: 
  • To count visits with a certain date range: From the middle column, drag Transaction Date into Include Records Where. Set this equal to your date range.
  • To count visits made through a certain sales method: From the middle, drag Sales Method Type into Include Records where. Set this equal to or one of the sales methods you're looking for.
  • To count participation in any program: In the left column, select Sales Order Item. From the middle column, drag Type into Include Records Where. Set this to be equal to ticket.
  • To count visits where members are attending a certain program: In the left column, expand Sales Order Item, expand Sales Order Item Ticket and select Program. From the middle column, drag Program record into Include Records Where. Set this to be equal to the program you'd like to consider. 
    • Note: For this particular query, we do not recommend adding the field Member\Is Primary is equal to Yes to Include records where if multiple members on the membership are purchasing tickets that you'd like to count as a visit. If you only book tickets under the primary member or only want to see what the primary member has purchased, you can add this field. 
Add fields to Results fields to display:
  1. Membership ID will be in the Results by default. Leave this field in the output to identify which memberships have visited. 
  2. To count the number of visits on a basic level: In the left column, expand Member, expand Constituent, then select Sales Order. From the middle column, drag Lookup ID to Results fields to display.
    • Note: We do not recommend counting the Lookup ID field using a query functioning. If you are filtering on a specific program or sales order item, the count function will inflate your count for each item (for example, if someone had one order with 3 price types (Adult, Student, and Child), using the Count function would show this as 3 visits.)
  3. If you'd like to use Membership Level to synthesize number of visits by Membership Level: In the left column select Memberships. From the middle column, drag Membership Level into Results Fields to Display.
Save your query:
  1. Click Set save options tab and Name your query
  2. If you will be using this query elsewhere in Altru, mark to Create a selection
  3. If you will be using this query in another query, mark to Show this Selection in the Query Designer
  4. Save and Close

Here is an example of what the final product will may look like: 
Query Examples for Member Visits