Counting Store Customers Within a DriveTime

Counting Store Customers within a DriveTime

This tip will look at how we can count the number of store customers within a DriveTime. Remember that within a stores DriveTime customers could have visited other store locations. So, this tip shows a count of those that have visited just the store in question.

Note: When generating the venue DriveTimes, name them in accordance to the Branch CODE (1010 where the Branch code is 1 and 010 is a 10min drivetime). You may have to edit the expression if your codes differ from this.

Open a browse on your schema that contains the Branch DriveTimes

Right click and select Add Column…

Go through the blue-grey link called User data

Double click on the red aggregated link to the Branch Customer schema, and then go through Sum

Double click on the Master table (the red table icon with a purple key)

Right click on the column that holds the Branch code and select Paste Count

An expression will appear in the Expression box and you will notice that <value> is highlighted. Replace this with:

INT(LEFT(:MASTER.SHAPE_NAME, LEN(:MASTER.SHAPE_NAME)-3))

The whole expression should look like this:

BRANCHCUSTOMERS:(INT(MASTER.STORE=INT(LEFT(:MASTER.SHAPE_NAME, LEN(:MASTER.SHAPE_NAME)-3))))

This expression takes the last three characters (003, 015, 030 and 060) off your drivetimes’ key and matches it to the venue key within your visitors so that it counts only those that match.

A screenshot of a computer Description automatically generated

You can check that the expression has worked correctly by browsing components on a few of your DriveTimes:

Open a browse on the schema that contains your DriveTimes

Select one of your DriveTimes

Right click on the red tick and select Browse Components, then Individual

This brings up a box called Browse Components – Individual Mode. Select your visitors schema

Click on OK

This will give you a list of all the customers that lay within the Branch DriveTime, whether they went to that venue or not. Sort on the Branch code and count how many there are and make sure it matches the outputted figure.