Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC-280 add PROPCOUNT + reformat #321

Merged
merged 3 commits into from
Oct 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,35 @@

Experiment Results supports the formula functions listed here:

**UNIQUES:**
### UNIQUES

Check warning on line 46 in content/collections/experiment-results/en/experiment-results-use-formula-metrics.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Amplitude.Headings] 'UNIQUES' should use sentence-style capitalization. Raw Output: {"message": "[Amplitude.Headings] 'UNIQUES' should use sentence-style capitalization.", "location": {"path": "content/collections/experiment-results/en/experiment-results-use-formula-metrics.md", "range": {"start": {"line": 46, "column": 5}}}, "severity": "WARNING"}

**Syntax**: UNIQUES(event)
**Syntax**: `UNIQUES(event)`

* **Event:** Refers to the event you're interested in. This must be a letter corresponding to an event in the Events Module.

Returns the number of unique users who triggered the event. 

**TOTALS:**
### TOTALS:

Check warning on line 54 in content/collections/experiment-results/en/experiment-results-use-formula-metrics.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Amplitude.Headings] 'TOTALS:' should use sentence-style capitalization. Raw Output: {"message": "[Amplitude.Headings] 'TOTALS:' should use sentence-style capitalization.", "location": {"path": "content/collections/experiment-results/en/experiment-results-use-formula-metrics.md", "range": {"start": {"line": 54, "column": 5}}}, "severity": "WARNING"}

**Syntax**: TOTALS(event)
**Syntax**: `TOTALS(event)`

* **Event:** Refers to the event you're interested in. This must be a letter corresponding to an event in the Events Module.

Returns the total number of times users triggered the event.

**PROPSUM:**
### PROPSUM

Check warning on line 62 in content/collections/experiment-results/en/experiment-results-use-formula-metrics.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Amplitude.Headings] 'PROPSUM' should use sentence-style capitalization. Raw Output: {"message": "[Amplitude.Headings] 'PROPSUM' should use sentence-style capitalization.", "location": {"path": "content/collections/experiment-results/en/experiment-results-use-formula-metrics.md", "range": {"start": {"line": 62, "column": 5}}}, "severity": "WARNING"}

**Syntax**: PROPSUM(event)
**Syntax**: `PROPSUM(event)`

* **Event:** Refers to the event you're interested in. This must be a letter corresponding to an event in the Events Module.

This function only works when grouping by a numerical property on the event. If grouping by multiple properties, the formula runs the calculation with the first group-by clause.

Returns the sum of the property values you're grouping the specified event by.

**PROPAVG:**
### PROPAVG

Check warning on line 72 in content/collections/experiment-results/en/experiment-results-use-formula-metrics.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Amplitude.Headings] 'PROPAVG' should use sentence-style capitalization. Raw Output: {"message": "[Amplitude.Headings] 'PROPAVG' should use sentence-style capitalization.", "location": {"path": "content/collections/experiment-results/en/experiment-results-use-formula-metrics.md", "range": {"start": {"line": 72, "column": 5}}}, "severity": "WARNING"}

**Syntax**: PROPAVG(event)
**Syntax**: `PROPAVG(event)`

* **Event:** Refers to the event you're interested in. This must be a letter corresponding to an event in the Events Module.

Expand All @@ -81,19 +81,19 @@

### PROPMAX

**Syntax**: PROPMAX(event)
**Syntax**: `PROPMAX(event)`

* **Event:** Returns the maximum value of the property you're grouping the specified event by. The property must be numeric. If grouping by multiple properties, the calculation uses the first group-by clause.

### PROPMIN

**Syntax**: PROPMIN(event)
**Syntax**: `PROPMIN(event)`

* **Event:** Returns the minimum value of the property you're grouping the specified event by. The property must be numeric. If grouping by multiple properties, the calculation uses the first group-by clause.

**CONVERSIONRATE (closed beta):**
### CONVERSIONRATE (closed beta)

**Syntax:** CONVERSIONRATE(array of events, conversion window, latency offset)
**Syntax:** `CONVERSIONRATE(array of events, conversion window, latency offset)`

* **Array of Events:** Refer to the events in the funnel.
* **Conversion window:** Refers to the conversion window of the funnel. The unit is in seconds.
Expand All @@ -107,9 +107,9 @@

![](/docs/output/img/experiment-results/23576087044507)

**CONVERSIONAVG (closed beta):**
### CONVERSIONAVG (closed beta)

**Syntax:** CONVERSIONAVG(array of events, conversion window, latency offset)
**Syntax:** `CONVERSIONAVG(array of events, conversion window, latency offset)`

* **Array of Events:** Refer to the events in the funnel.
* **Conversion window:** Refers to the conversion window of the funnel. The unit is in seconds.
Expand All @@ -123,6 +123,18 @@

Returns the average value of the given property among all the users who completed the conversion. This function internally uses Funnel Query to get the average value among the converted users.

### PROPCOUNT

Check warning on line 126 in content/collections/experiment-results/en/experiment-results-use-formula-metrics.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Amplitude.Headings] 'PROPCOUNT' should use sentence-style capitalization. Raw Output: {"message": "[Amplitude.Headings] 'PROPCOUNT' should use sentence-style capitalization.", "location": {"path": "content/collections/experiment-results/en/experiment-results-use-formula-metrics.md", "range": {"start": {"line": 126, "column": 5}}}, "severity": "WARNING"}

**Syntax:** `PROPCOUNT(event)`

* **Event:** Refers to the event that interests you. This must be a letter that corresponds to an event in the Events card. If grouping by multiple properties, the formula runs the calculation with the first group by clause.

Returns the number of distinct property values for the property the event is grouped by. In this setup, the formula retrieves the number of different departments covering all the items for which details were viewed:

Check warning on line 132 in content/collections/experiment-results/en/experiment-results-use-formula-metrics.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Amplitude.Passive] 'were viewed' looks like passive voice. Raw Output: {"message": "[Amplitude.Passive] 'were viewed' looks like passive voice.", "location": {"path": "content/collections/experiment-results/en/experiment-results-use-formula-metrics.md", "range": {"start": {"line": 132, "column": 204}}}, "severity": "WARNING"}

![propcount_sidecontrols.png](/docs/output/img/event-segmentation/propcount-sidecontrols-png.png)
markzegarelli marked this conversation as resolved.
Show resolved Hide resolved

`PROPCOUNT` is an **estimate** of distinct property values. This estimate comes from a [HyperLogLog algorithm,](https://en.wikipedia.org/wiki/HyperLogLog) and its accuracy depends on amount of data it has to work with. Expect a relative error in the range of 0.1% for less than 12,000 unique values, and up to 0.5% for more than 12,000 unique property values, depending on the cardinality of the property. 
markzegarelli marked this conversation as resolved.
Show resolved Hide resolved

## Formula syntax

In your formulas, refer to events selected in the Events Module by their corresponding letter. The functions and the parameters aren't case-sensitive. You can also perform the following arithmetic operations:
Expand Down
Loading