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 how many of the total users who sign in to our web site navigate away before they complete a purchase.
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 set 1 field and enter a unique name for the measure. We entered All users.
- In the second measure, select the appropriate variables from the drop-down lists. We want to determine how many users navigate away from our web site without completing a transaction. So we chose to show count unique values of action, filtered to events with action that matches navigated away.
- Click inside the set 2 field and enter a unique name for the measure. We entered Navigate away.
- Click compare to... Then, in the new measure field, click Show and select Calculate from the drop-down list. This will divide the 2nd value (Navigated away) into the 1st value (All users) for a ratio of the two values.
- Accept, or change, the remaining defaults of split by none, starting 7 days ago, and ending now.
- Click GO.
Now that you've created a query to determine a ration, you can move on to analyzing user sessions with flows.