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
Show file tree
Hide file tree
Changes from all commits
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,67 +43,67 @@

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.

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 average of the property values you're grouping by. This function is the same as `PROPSUM(event)/TOTALS(event)`. [Learn more about how Amplitude calculates PROPAVG and PROPSUM in this article](/docs/feature-experiment/under-the-hood/experiment-analysis-chart-calculation)

**PROPCOUNT**
### PROPCOUNT

Check warning on line 82 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": 82, "column": 5}}}, "severity": "WARNING"}

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

* Event: Refers to the event that interests you. This must be a letter that corresponds to an event in the Events card. The event property must be a number. 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.

`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.

**PROPMAX**
### PROPMAX

Check warning on line 92 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] 'PROPMAX' should use sentence-style capitalization. Raw Output: {"message": "[Amplitude.Headings] 'PROPMAX' should use sentence-style capitalization.", "location": {"path": "content/collections/experiment-results/en/experiment-results-use-formula-metrics.md", "range": {"start": {"line": 92, "column": 5}}}, "severity": "WARNING"}

**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**
### 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 @@ -117,9 +117,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 @@ -133,6 +133,22 @@

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 136 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": 136, "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 142 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": 142, "column": 204}}}, "severity": "WARNING"}

![propcount_sidecontrols.png](/docs/output/img/experiment-results/propcount-sidecontrols-png.png)

`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.

{{partial:admonition type="note" heading=""}}
`PROPCOUNT` supports only numeric event properties in Experiment.
{{/partial:admonition}}

## 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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading