Many businesses 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.
To create a query that determines a ratio between two measures, do the following:
- In the upper left corner of the window, select the desired dataset from the drop-down menu.
- Click the Explore icon.
- In the first measure, select the appropriate variables from the drop-down lists. We selected the variables for total users: count unique username actors, filtered to all username actors.
- Click inside the measure 1 field and enter a unique name for the measure. We entered All users.
- For measure 2, select the query variable options from the drop-down lists, then click inside measure 2 field and enter a unique name. We chose to show count unique values of Movies watched over the last 200 days, filtered to all user actors, then named the measure Movies watched.
- Click compare to... Then in measure 3, click Show, then choose Calculate from the drop-down list.
- Select the divisor from the corresponding drop-down list. This will divide the selected option (divisor) into the remaining value for a ratio between the two values. In our example, divided Movies watched into All users.
- Accept, or change, the split by, Starting and Ending values.
- Click GO. We received the following results for our example.
Now that you've created a query to determine a ration, you can move on to analyzing user sessions with flows.