...
Excerpt |
---|
Computes the rolling unique kth largest value forward or backward of the current row. Inputs can be Integer, Decimal, or Datetime. |
For purposes of this calculation, two instances of the same value are treated at one value for k. So, if your dataset contains four rows with column values 10
, 9
, 9
, and 8
, then KTHLARGESTUNIQUE
returns 9
for k=2
and 8
for k=3
.
...
Name of the column whose values are used to compute the function. Inputs must be Integer, Decimal, or Datetime values.
Info |
---|
NOTE: If the input is in Datetime type, the output is in unixtime format. You can wrap these outputs in the DATEFORMAT function |
...
to output the results in the appropriate Datetime format. See DATEFORMAT Function. |
- Multiple columns and wildcards are not supported.
...
Required? | Data Type | Example Value |
---|---|---|
Yes | String (column reference to Integer or Decimal values) | myColumn |
k_integer
Integer representing the ranking of the unique value to extract from the source column. Duplicate values are treated as a single value for purposes of this function's calculation.
...