Transformation: Added variance and standard deviation (#48844)

* Transformation: Added variance and standard deviation for sample and population. Modified mean calculation approach

* Transformation: Removed existing mean calculation

* Transformation: Added testcases for variance and Standard deviation

* Update docs/sources/panels/calculation-types.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
This commit is contained in:
selvavm
2022-05-11 17:16:41 -07:00
committed by GitHub
co-authored by brendamuir
parent 3a32a73459
commit 906484b809
3 changed files with 88 additions and 21 deletions
+23 -19
View File
@@ -6,23 +6,27 @@ weight = 1100
# Reference: Calculation types
Refer to the following list of calculations you can perform in Grafana. You can find these calculations in the **Transform** tab and in the bar gauge, gauge, and stat visualizations.
You can perform the following calculations in Grafana. Navigate to the **Transform** tab and in the bar gauge, gauge, and stat visualizations.
| Calculation | Description |
| :----------------- | :-------------------------------------------------------- |
| All nulls | True when all values are null |
| All zeros | True when all values are 0 |
| Change count | Number of times the field's value changes |
| Count | Number of values in a field |
| Delta | Cumulative change in value, only counts increments |
| Difference | Difference between first and last value of a field |
| Difference percent | Percentage change between first and last value of a field |
| Distinct count | Number of unique values in a field |
| First (not null) | First, not null value in a field |
| Max | Maximum value of a field |
| Mean | Mean value of all values in a field |
| Min | Minimum value of a field |
| Min (above zero) | Minimum, positive value of a field |
| Range | Difference between maximum and minimum values of a field |
| Step | Minimal interval between values of a field |
| Total | Sum of all values in a field |
| Calculation | Description |
| :------------------------------ | :---------------------------------------------------------------- |
| All nulls | True when all values are null |
| All zeros | True when all values are 0 |
| Change count | Number of times the field's value changes |
| Count | Number of values in a field |
| Delta | Cumulative change in value, only counts increments |
| Difference | Difference between first and last value of a field |
| Difference percent | Percentage change between first and last value of a field |
| Distinct count | Number of unique values in a field |
| First (not null) | First, not null value in a field |
| Max | Maximum value of a field |
| Mean | Mean value of all values in a field |
| Variance (Population) | Variance (based on population) of all values in a field |
| Standard deviation (Population) | Standard deviation (based on population) of all values in a field |
| Variance (Sample) | Variance (based on sample) of all values in a field |
| Standard deviation (Sample) | Standard deviation (based on sample) of all values in a field |
| Min | Minimum value of a field |
| Min (above zero) | Minimum, positive value of a field |
| Range | Difference between maximum and minimum values of a field |
| Step | Minimal interval between values of a field |
| Total | Sum of all values in a field |