Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex DataLens
    • Overview
    • Formula syntax
    • Neuroanalyst for creating calculated fields
      • All Functions
        • Overview
        • ARRAY
        • ARR_AVG
        • ARR_DISTINCT
        • ARR_INDEX_OF
        • ARR_INTERSECT
        • ARR_MAX
        • ARR_MIN
        • ARR_PRODUCT
        • ARR_REMOVE
        • ARR_STR
        • ARR_SUM
        • CAST_ARR_FLOAT
        • CAST_ARR_INT
        • CAST_ARR_STR
        • CONTAINS
        • CONTAINS_ALL
        • CONTAINS_ANY
        • CONTAINS_SUBSEQUENCE
        • COUNT_ITEM
        • GET_ITEM
        • LEN
        • REPLACE
        • SLICE
        • STARTSWITH
        • UNNEST
      • Function Availability
    • Parameters
  • DataLens Gallery
  • Audit Trails events
  1. Calculated fields
  2. Function reference
  3. Array functions
  4. ARR_INDEX_OF

ARR_INDEX_OF

Written by
Yandex Cloud
Updated at December 19, 2025
View in Markdown

SyntaxSyntax

ARR_INDEX_OF( array, value )

DescriptionDescription

Returns the position (index) of the first occurrence of the value value in the array array. The indexing starts from 1. If the value value is not found in the array, the function returns 0.

Argument types:

  • array — Array of fractional numbers | Array of integers | Array of strings
  • value — Fractional number | Integer | String

Return type: Integer

ExamplesExamples

ARR_INDEX_OF(ARRAY('a', 'b', 'c', 'b'), 'b') = 2
ARR_INDEX_OF(ARRAY(1.1, 2.2, 3.3, 3.3), 3) = 3
ARR_INDEX_OF(ARRAY(1, 2, 3, 2), 2) = 2
ARR_INDEX_OF(ARRAY('a', 'b', 'c', 'b'), 'd') = 0

Data source supportData source support

ClickHouse 21.8, Files, Google Sheets, PostgreSQL 9.3, Trino, Yandex Documents.

Was the article helpful?

Previous
ARR_DISTINCT
Next
ARR_INTERSECT
© 2026 Direct Cursus Technology L.L.C.