diff --git a/content/v2.0/query-data/flux/increase.md b/content/v2.0/query-data/flux/increase.md index 4f6e10cc7..1b5ff21f0 100644 --- a/content/v2.0/query-data/flux/increase.md +++ b/content/v2.0/query-data/flux/increase.md @@ -4,8 +4,8 @@ seotitle: Calculate the increase in Flux list_title: Increase description: > Use the [`increase()` function](/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/increase/) - to calculate the increase in values since the beginning of the series or table. - This function is especially useful when tracking changes in counter values which + to track increases across multiple columns in a table. + This function is especially useful when tracking changes in counter values that wrap over time or periodically reset. weight: 210 menu: @@ -21,8 +21,8 @@ list_code_example: | --- Use the [`increase()` function](/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/increase/) -to calculate the increase of values in a table. -This function is especially useful when tracking changes in counter values which +to track increases across multiple columns in a table. +This function is especially useful when tracking changes in counter values that wrap over time or periodically reset. ```js @@ -30,6 +30,9 @@ data |> increase() ``` +`increase()` returns a cumulative sum of **non-negative** differences between rows in a table. +For example: + {{< flex >}} {{% flex-content %}} **Given the following input:** diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/increase.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/increase.md index 7528cca0f..cfb8afb87 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/increase.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/increase.md @@ -1,6 +1,8 @@ --- title: increase() function -description: The `increase()` function calculates the total non-negative difference between values in a table. +description: > + The `increase()` function calculates the cumulative sum of **non-negative** differences + between subsequent values. aliases: - /v2.0/reference/flux/functions/transformations/aggregates/increase - /v2.0/reference/flux/functions/built-in/transformations/aggregates/increase/ @@ -11,8 +13,8 @@ menu: weight: 501 --- -The `increase()` function calculates the total non-negative difference between -subsequent values. +The `increase()` function calculates the cumulative sum of **non-negative** differences +between subsequent values. A main use case is tracking changes in counter values which may wrap over time when they hit a threshold or are reset. In the case of a wrap/reset, we can assume that the absolute delta between two @@ -58,8 +60,8 @@ Given the following input table: | _time | _value | | ----- | ------ | | 00002 | 4 | -| 00003 | 7 | -| 00004 | 8 | +| 00003 | 4 | +| 00004 | 5 | ## Function definition ```js