Redivis Documentation
API DocumentationRedivis Home
  • Introduction
  • Redivis for open science
    • FAIR data practices
    • Open access
    • Data repository characteristics
    • Data retention policy
    • Citations
  • Guides
    • Getting started
    • Discover & access data
      • Discover datasets
      • Apply to access restricted data
      • Create a study
    • Analyze data in a workflow
      • Reshape data in transforms
      • Work with data in notebooks
      • Running ML workloads
      • Example workflows
        • Analyzing large tabular data
        • Create an image classification model
        • Fine tuning a Large Language Model (LLM)
        • No-code visualization
        • Continuous enrollment
        • Select first/last encounter
    • Export & publish your work
      • Export to other environments
      • Build your own site with Observable
    • Create & manage datasets
      • Create and populate a dataset
      • Upload tabular data as tables
      • Upload unstructured data as files
      • Cleaning tabular data
    • Administer an organization
      • Configure access systems
      • Grant access to data
      • Generate a report
      • Example tasks
        • Emailing subsets of members
    • Video guides
  • Reference
    • Your account
      • Creating an account
      • Managing logins
      • Single Sign-On (SSO)
      • Workspace
      • Studies
      • Compute credits and billing
    • Datasets
      • Documentation
      • Tables
      • Variables
      • Files
      • Creating & editing datasets
      • Uploading data
        • Tabular data
        • Geospatial data
        • Unstructured data
        • Metadata
        • Data sources
        • Programmatic uploads
      • Version control
      • Sampling
      • Exporting data
        • Download
        • Programmatic
        • Google Data Studio
        • Google Cloud Storage
        • Google BigQuery
        • Embedding tables
    • Workflows
      • Workflow concepts
      • Documentation
      • Data sources
      • Tables
      • Transforms
        • Transform concepts
        • Step: Aggregate
        • Step: Create variables
        • Step: Filter
        • Step: Join
        • Step: Limit
        • Step: Stack
        • Step: Order
        • Step: Pivot
        • Step: Rename
        • Step: Retype
        • Step: SQL query
        • Variable selection
        • Value lists
        • Optimization and errors
        • Variable creation methods
          • Common elements
          • Aggregate
          • Case (if/else)
          • Date
          • DateTime
          • Geography
          • JSON
          • Math
          • Navigation
          • Numbering
          • Other
          • Statistical
          • String
          • Time
      • Notebooks
        • Notebook concepts
        • Compute resources
        • Python notebooks
        • R notebooks
        • Stata notebooks
        • SAS notebooks
        • Using the Jupyter interface
      • Access and privacy
    • Data access
      • Access levels
      • Configuring access
      • Requesting access
      • Approving access
      • Usage rules
      • Data access in workflows
    • Organizations
      • Administrator panel
      • Members
      • Studies
      • Workflows
      • Datasets
      • Permission groups
      • Requirements
      • Reports
      • Logs
      • Billing
      • Settings and branding
        • Account
        • Public profile
        • Membership
        • Export environments
        • Advanced: DOI configuration
        • Advanced: Stata & SAS setup
        • Advanced: Data storage locations
        • Advanced: Data egress configuration
    • Institutions
      • Administrator panel
      • Organizations
      • Members
      • Datasets
      • Workflows
      • Sub-institutions
      • Reports
      • Logs
      • Settings and branding
    • Quotas and limits
    • Glossary
  • Additional Resources
    • Events and press
    • API documentation
    • Redivis Labs
    • Office hours
    • Contact us
    • More information
      • Product updates
      • Roadmap
      • System status
      • Security
      • Feature requests
      • Report a bug
Powered by GitBook
On this page
  • First value
  • Lag
  • Last value
  • Lead
  • Nth value
  • Percentile (continuous)
  • Percentile (discrete)

Was this helpful?

Export as PDF
  1. Reference
  2. Workflows
  3. Transforms
  4. Variable creation methods

Navigation

Last updated 1 year ago

Was this helpful?

First value

Returns the value of a variable for the first row in a given analytic window. –>

FIRST_VALUE(@variable[ @ignore_null NULLS])

Return type

dynamic (input-dependent)

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@ignore_null

any of: IGNORE, RESPECT

false

(Ignore nulls (default))

Lag

Returns the value of a variable on a preceding row within the analytic window –>

LAG(@variable, @literal[, @default_value])

Return type

dynamic (input-dependent)

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@literal

false

(1)

@default_value

false

(NULL)

Last value

LAST_VALUE(@variable[ @ignore_null NULLS])

Return type

dynamic (input-dependent)

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@ignore_null

any of: IGNORE, RESPECT

false

(Ignore nulls (default))

Lead

LEAD(@variable, @literal[, @default_value])

Return type

dynamic (input-dependent)

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@literal

false

(1)

@default_value

false

(NULL)

Nth value

NTH_VALUE(@variable, @literal[ @ignore_null NULLS])

Return type

dynamic (input-dependent)

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@literal

true

-

@ignore_null

any of: IGNORE, RESPECT

false

(Ignore nulls (default))

Percentile (continuous)

PERCENTILE_CONT(@variable, @literal[ @ignore_null NULLS])

Return type

float

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

(variable)

@literal

true

(Value between [0, 1])

@ignore_null

any of: IGNORE, RESPECT

false

(Ignore nulls (default))

Percentile (discrete)

PERCENTILE_DISC(@variable, @literal[ @ignore_null NULLS])

Return type

float

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

(variable)

@literal

true

(Value between [0, 1])

@ignore_null

any of: IGNORE, RESPECT

false

(Ignore nulls (default))

any

any

any

any

Returns the value of a variable for the last row in a given analytic window. –>

any

Returns the value of a variable on a subsequent row within the analytic window –>

any

any

any

Returns the value at the Nth row of a given window frame. –>

any

any

Computes the specified percentile value for a variable within an ordered partition, with linear interpolation. –>

any ,

any

Computes the specified percentile value for a variable within an ordered partition. Returns the first sorted value with cumulative distribution greater than or equal to the percentile. –>

any ,

any

learn more
learn more
learn more
learn more
learn more
learn more
learn more
variable
Redivis type
enum
variable
Redivis type
literal
integer
literal
Redivis type
variable
Redivis type
enum
variable
Redivis type
literal
integer
literal
Redivis type
variable
Redivis type
literal
integer
enum
variable
integer
float
literal
float
enum
variable
integer
float
literal
float
enum