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

...

To calculate the maximum value of rows without conditionals, use the MAX function. See MAX Function.

D s
snippetBasic

MAXIF
d-codelang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextpivot value:
maxif(testScores, testCount >= 3) group:studentId limit:1

...

maxif(testScores, testCount >= 3)

Output: Returns the maximum of the testScores column for that studentId value when  column when the testCount is greater than or equal to 3. The limit parameter defines the maximum number of output columns.

D s
snippetSyntax

:MAXIF
d-code-lang-syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextpivot value
:maxif(col_ref, test_expression) [group:group_col_ref] [limit:limit_count]

maxif(col_ref, test_expression) [group:group_col_ref] [limit:limit_count]


ArgumentRequired?Data TypeDescription
col_refYstringReference to the column you wish to evaluate.
test_expressionYstringExpression that is evaluated. Must resolve to true or false

...