Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex DataLens
    • Overview
    • Formula syntax
      • All Functions
        • Overview
        • CASE
        • IF
        • IFNULL
        • ISNULL
        • ZN
      • Function Availability
    • Parameters
  • Audit Trails events

In this article:

  • CASE
  • IF
  • IFNULL
  • ISNULL
  • ZN
  1. Calculated fields
  2. Function reference
  3. Logical functions
  4. Overview

Logical functions

Written by
Yandex Cloud
Updated at March 28, 2024
  • CASE
  • IF
  • IFNULL
  • ISNULL
  • ZN

CASECASE

Syntax:
CASE expression WHEN value_1 THEN result_1 [ WHEN value_2 THEN result_2 ... ] ELSE default_result END
or
CASE( expression, value_1, result_1, [ value_2, result_2, ... ] default_result )

Compares expression to value_1, value_2, ... consecutively and returns the corresponding result for the first match. If no match is found, it returns default_result.

IFIF

Syntax:
IF condition_1 THEN result_1 [ ELSEIF condition_2 THEN result_2 ... ] ELSE default_result END
or
IF( condition_1, result_1, [ condition_2, result_2, ... ] default_result )

Checks conditional expressions condition_1, result_1, ... and returns the matching result for the first condition found to be TRUE. IF all conditional expressions are FALSE, it returns default_result. The expressions to be checked are set using logical operators.

IFNULLIFNULL

Syntax:IFNULL( check_value, alt_value )

Returns check_value if it's not NULL. Otherwise returns alt_value.

ISNULLISNULL

Syntax:
ISNULL( expression )
or
expression IS [ NOT ] NULL

Returns TRUE if expression is NULL, otherwise returns FALSE.

expression IS NOT NULL returns the opposite result.

ZNZN

Syntax:ZN( expression )

Returns expression if it's not NULL. Otherwise returns 0.

Was the article helpful?

Previous
YEAR
Next
CASE
© 2025 Direct Cursus Technology L.L.C.