# Determine a ratio

Sometimes you may want to determine the ratio between two events:

• A measure assigns a value to a set, which is interpreted as its size.

• A ratio is the relationship between two measures, indicating how many times the first measure contains the second.

This article demonstrates how to construct a query using two measures, then how to determine the ratio between the two measures.

## How to determine the ratio between two measures

This section demonstrates how to create a query that determines a ratio between two measures. In our example, we want to determine the number of unique users who watched movies over the last 200 days, and the ratio of movies watched to the number of unique users.

Determining a ratio between two measures involves three steps:

1. Define the first measure.

2. Define the second measure.

3. Define a third measure that is the ratio of the first two measures.

###### To create a query that determines a ratio between two measures, do the following:
1. Click Explore

2. To define the first measure, select the appropriate variables from the dropdown lists. We did the following:

1. Accept the default count aggregation.

2. Click events and select user from the dropdown. The text auto updates to Count unique user actors and filtered to all user actors.

3. Click measure 1 and enter a unique name for the measure. We entered All users.

3. Click +measure to begin defining measure 2.

1. For measure 2, select the options from the dropdown lists. We chose to show count unique values of an actor property defined previously, Number of searches. We accepted the filter, Filtered to all user actors

2. Click measure 2 and enter a name. We named the measure Searches.

4. Click +measure to begin defining measure 3. This measure will be the ratio of the first two measures.

5. In measure 3, click Count, then type an equals sign. Optionally click the arrow to open the Advanced Operations workspace.

Type a left bracket [. A dropdown appears containing the first two measures.

6. Select the numerator from the dropdown list, then type a slash.

7. Type a left bracket and select the denominator. Click outside the dropdown to accept the expression.

8. Accept, or change, the Split ByStarting and Ending values.

9. Click GO to see results.