> ## Documentation Index
> Fetch the complete documentation index at: https://docs.less.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Functions

<AccordionGroup>
  <Accordion title="COALESCE">
    Returns the first non-null value from a list of expressions. Evaluates expressions from left to right and returns the first one that is not null. If all expressions are null, returns null.

    <Frame caption="Take first nulls_col and if that's null then take simple_int and if that's null then return 999">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/Coalesce.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=5e97ef0382c2fcae584635eeedbd0248" alt="COALESCE function" width="1990" height="1352" data-path="images/canvas/syntax/functions/Coalesce.png" />
    </Frame>
  </Accordion>

  <Accordion title="IFF">
    Conditional function/statement that returns one value if a condition is true, and another value if false. Can be nested within other IFF functions for complex conditional logic. Syntax: IFF(condition, value\_if\_true, value\_if\_false).

    <Warning>
      The condition must default to a boolean value (true or false).  That means that the statement '"hello"' is not a boolean value. However, \[column]="hello" is a boolean value because it is either true or false for a given row.
    </Warning>

    <Frame caption="If nulls_col is larger than 40 then return 'larger than 40', if it is null then return 'null' and if none of those are true then return 'not larger than 40 and not null'">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/Iff.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=fae94b7ded2a419ada9bb298ec113782" alt="If column function" width="1882" height="1244" data-path="images/canvas/syntax/functions/Iff.png" />
    </Frame>
  </Accordion>

  <Accordion title="CONCAT">
    Concatenates two or more string values into a single string with a custom separator/delimiter. Combines multiple text values in the order they are provided. Returns an empty string if all input values are null.

    <Frame caption="Turning simple_int into a string and concatenating it with text_col and 'HELLOWORLD' separated by a hyphen">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/Concat.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=45cc5316a0da27bc943a4c173709b356" alt="Concat function" width="1882" height="1244" data-path="images/canvas/syntax/functions/Concat.png" />
    </Frame>
  </Accordion>

  <Accordion title="FLOAT">
    Converts a value to a decimal column type. Handles conversion from strings, integers, and other numeric types.

    <Frame caption="Converting a string to a float">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/SimpleFloat.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=3ac8bf7c57dd6fdba9de9d43b8bfa49d" alt="Float function" width="1882" height="1244" data-path="images/canvas/syntax/functions/SimpleFloat.png" />
    </Frame>

    <br />

    <Frame caption="Taking the right-most character from the text_col and converting it to a float - then dividing b 0.234">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/float.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=0c4ba29c9f21ee567cacd838a17c237c" alt="Float function" width="1882" height="1244" data-path="images/canvas/syntax/functions/float.png" />
    </Frame>
  </Accordion>

  <Accordion title="INT">
    Converts a value to an integer columns type. Rounds down to the nearest integer when converting from float values.

    <Frame caption="Taking the right-most character from the text_col and converting it to an integer">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/INT.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=858bf512ca41d5d305bda46adbef6bc7" alt="Int function" width="1882" height="1244" data-path="images/canvas/syntax/functions/INT.png" />
    </Frame>
  </Accordion>

  <Accordion title="DATE">
    Converts a text literal or text column to a datetime type. Note that the value has to be without a time component and in this format: YYYY-MM-DD.

    <Frame caption="Converting a text literal - 2025-01-01 - to a date">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/DATE.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=c17a8997a32acda0846e8a6d7fe95e29" alt="Date function" width="1882" height="1244" data-path="images/canvas/syntax/functions/DATE.png" />
    </Frame>
  </Accordion>

  <Accordion title="DATETIME">
    Converts a text literal or text column to a datetime type. Note that the value has to be with a time component and in this format: YYYY-MM-DD HH:MM:SS.

    <Frame caption="Converting date_string column to a datetime">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/DATETIME.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=052c6b4f107d94809ed22d59ae282316" alt="Datetime function" width="1882" height="1244" data-path="images/canvas/syntax/functions/DATETIME.png" />
    </Frame>
  </Accordion>

  <Accordion title="AND">
    Logical operator that returns true only if all conditions are true. Typically used within IFF functions or [IF Column](/tools/new-columns/if-column) tool for complex conditional logic. Returns false if any condition is false or null.

    <Warning>
      Each part of the AND function must default to a boolean value (true or false). That means that the statement '"hello"' is not a boolean value. However, \[column]="hello" is a boolean value because it is either true or false for a given row.
    </Warning>

    <Frame caption="Using AND in IFF function. If nulls_col is null AND simple_int is 2 then return 'both are true' else return 'both are NOT true'">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/AND.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=25672eeec7835253949deafe08c60a56" alt="AND function" width="1882" height="1244" data-path="images/canvas/syntax/functions/AND.png" />
    </Frame>
  </Accordion>

  <Accordion title="OR">
    Logical operator that returns true if at least one condition is true. Typically used within IFF functions or [IF Column](/tools/new-columns/if-column) tool for complex conditional logic. Returns false only if all conditions are false or null.

    <Warning>
      Each part of the OR function must default to a boolean value (true or false). That means that the statement '"hello"' is not a boolean value. However, \[column]="hello" is a boolean value because it is either true or false for a given row.
    </Warning>

    <Frame caption="Using OR in IFF function. If nulls_col is null OR simple_int is 2 then return 'one is true' else return 'none are true'">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/OR.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=20ab42d866d287d595be293dab27e769" alt="OR function" width="1882" height="1244" data-path="images/canvas/syntax/functions/OR.png" />
    </Frame>
  </Accordion>

  <Accordion title="ISNULL">
    Returns a boolean value indicating whether a value is null. Returns true if the value is null, false otherwise. Useful for conditional logic and data validation.

    <Frame caption="Checking if nulls_col is null">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/ISNULL.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=5a7c1228eea773b72bbf4af3eb399061" alt="ISNULL function" width="1882" height="1244" data-path="images/canvas/syntax/functions/ISNULL.png" />
    </Frame>
  </Accordion>

  <Accordion title="ISNOTNULL">
    Returns a boolean value indicating whether a value is not null. Returns true if the value has any non-null content, false if the value is null. Useful for conditional logic and data validation.

    <Frame caption="Checking if nulls_col is not null">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/ISNOTNULL.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=48a355c37635b9f32a0dde5e07e88987" alt="ISNOTNULL function" width="1882" height="1244" data-path="images/canvas/syntax/functions/ISNOTNULL.png" />
    </Frame>
  </Accordion>

  <Accordion title="ISTRUE">
    Returns a boolean value indicating whether a value is true. Returns true if the value is true, false otherwise. Useful for conditional logic and data validation.

    <Frame caption="Created a column if bool is true">
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/less-51/images/canvas/syntax/functions/ISTRUE.png" alt="ISTRUE function" />
    </Frame>
  </Accordion>

  <Accordion title="ISFALSE">
    Returns a boolean value indicating whether a value is false. Returns true if the value is false, false otherwise. Useful for conditional logic and data validation.

    <Frame caption="Created a column if bool is false">
      <img src="https://mintcdn.com/less-51/djN6yMHrWL_J2lhR/images/canvas/syntax/functions/ISFALSE.png?fit=max&auto=format&n=djN6yMHrWL_J2lhR&q=85&s=46bb3e07650f73d53ea3f6c300ea1aea" alt="ISFALSE function" width="1882" height="1184" data-path="images/canvas/syntax/functions/ISFALSE.png" />
    </Frame>
  </Accordion>
</AccordionGroup>
