<< Click to Display Table of Contents >> Dynamic Calculation |
Functions |
Syntax |
Instructions |
Examples |
---|---|---|---|
diff |
diff(expression, [int position]) |
Returns the difference between two specified values Parameter 1 expression: expression column Parameter 2 position: The optional values are FIRST(first), PREVIOUS(forward), NEXT(backward), LAST(last). You can also enter numbers, corresponding to 1, 2, 3, and 4, respectively |
For example: diff(sum(col['profit']), PREVIOUS) |
percentDiff |
percentDiff(expression, [int position]) |
Returns the percentage difference between two specified values Parameter 1 expression: expression column Parameter 2 position: Optional values are FIRST(first), PREVIOUS(forward), NEXT(backward), LAST(last). You can also enter numbers, corresponding to 1, 2, 3, and 4, respectively |
For example: percentDiff(sum(col['profit']), PREVIOUS) |
percent |
percent(expression, [int position]) |
Returns the percentage of two specified values Parameter 1 expression: expression column Parameter 2 position: Optional values are FIRST(first), PREVIOUS(forward), NEXT(backward), LAST(last). You can also enter numbers, corresponding to 1, 2, 3, and 4, respectively |
For example: percent(sum(col['profit']), PREVIOUS) |
percentSum |
percentSum(expression) |
Returns the current value as a percentage of the sum |
For example: percentSum(sum(col['profit'])) |
percentMax |
percentMax(expression) |
Returns the percentage of the current value to the maximum |
For example: percentMax(col['profit']) |
percentMin |
percentMin(expression) |
Returns the percentage of the current value to the minimum value |
For example: percentMin(col['profit']) |
percentAvg |
percentAvg(expression) |
Returns the percentage of the current value to the minimum value |
For example: percentAvg(col['profit']) |
movingSum |
movingSum(expression,[ int prev, int next, boolean cincludedCurrent, boolean nappended]) |
Move the calculation sum and return the sum from the first few values to the last few values Parameter 1 expression: expression column Parameter 2 prev: The first few values participate in the calculation Parameter 3 next: The last few values participate in the calculation Parameter 4 cincludedCurrent: Whether to include the current value |
For example: movingSum(sum(col['profit']), 2, 2, true, true) |
movingAvg |
movingAvg(expression, [int prev, int next, boolean cincluded, boolean nappended]) |
Move the average value and return the average value from the first few values to the last few values Parameter 1 expression: expression column Parameter 2 prev: The first few values participate in the calculation Parameter 3 next: The last few values participate in the calculation Parameter 4 cincludedCurrent: Whether to include the current value |
For example: movingAvg(sum(col['profit']), 2, 2, true, true) |
movingMax |
movingMax(expression, [int prev, int next, boolean cincluded, boolean nappended]) |
Move the calculated maximum value and return the maximum value from the first few values to the last few values Parameter 1 expression: expression column Parameter 2 prev: The first few values participate in the calculation Parameter 3 next: The last few values participate in the calculation Parameter 4 cincludedCurrent: Whether to include the current value Parameter 5 nappended: If there is not enough value, whether to take blank |
For example: movingMax(sum(col['profit']), 2, 2, true, true) |
movingMin |
movingMin(expression, [int prev, int next, boolean cincluded,boolean nappended]) |
Move to calculate the minimum value and return the minimum value from the first few values to the last few values Parameter 1 expression: expression column Parameter 2 prev: The first few values participate in the calculation Parameter 3 next: The last few values participate in the calculation Parameter 4 cincludedCurrent: Whether to include the current value Parameter 5 nappended: If there is not enough value, whether to take blank |
For example: movingMin(sum(col['profit']), 2, 2, true, true) |
rank |
rank(expression) |
Returns the numerical rank of a list of numbers |
For example: rank(3.5,["7", "3.5", "3.5", "1", "2"], 1) |
runningSum |
runningSum(expression,[reset]) |
Cumulatively calculate the sum, returning from the first value to the current value, cumulatively summing Parameter 1 expression: expression column Parameter 2 reset: Specifies which field is re-accumulated based on the value of the field |
For example: runningSum(Sum(col['profit']), col['product_type']) |
runningAvg |
runningAvg(expression,[reset]) |
Cumulatively calculate the average value and return from the first value to the current value, cumulatively average Parameter 1: Expression column. Parameter 2 specifies the re-accumulation based on which field value changes |
For example: runningAvg(Sum(col['profit']), col['product_type']) |
runningMax |
runningMax(expression,[reset]) |
Cumulatively calculate the maximum value, return from the first value to the current value, and cumulatively find the maximum value Parameter 1 expression: expression column Parameter 2 reset: Specifies which field is re-accumulated based on the value of the field |
For example: runningMax(Sum(col['profit']), col['product_type']) |
runningMin |
runningMin(expression,[reset]) |
Cumulatively calculate the minimum value, return from the first value to the current value, and cumulatively find the minimum value Parameter 1 expression: expression column Parameter 2 reset: Specifies which field is re-accumulated based on the value of the field |
For example: runningMin(Sum(col['profit']), col['product_type']) |