Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next

...

Excerpt

Computes the rolling kth largest value forward or backward of the current row. Inputs can be Integer, Decimal, or Datetime.

KTHLARGEST extracts the ranked value from the values in a column, where k=1 returns the maximum value. The value for k must be between 1 and 1000, inclusive. For purposes of this calculation, two instances of the same value are treated as separate values. So, if your dataset contains three rows with column values 109, and 9, then KTHLARGEST returns 9 for k=2 and 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.

...