{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["availability","img","callout","cards","card","faq","faq-item","partial"]},"type":"markdown","userRole":"Users, Editors, and Admins","accountType":"All accounts","plan":"Exclusive to select subscription plans"},"seo":{"title":"Add a calculated column to a dataset","description":"Learn how to create new columns in your dataset using custom formulas. Includes helpful tips, examples, and guidance for effective use.","siteUrl":"https://help.databox.com","llmstxt":{"title":"Databox Knowledge Base","description":"Databox is a business analytics platform that consolidates data in one place, enabling real-time performance tracking and insights by mixing and matching data from various sources for a comprehensive view.","details":{"content":"This knowledge base covers everything from account setup and integrations to building Databoards, creating custom metrics, and using AI-powered features."},"sections":[{"title":"General","includeFiles":["docs/general/*.md","docs/general/visualization-types/*.md","docs/general/templates/*.md"],"excludeFiles":[]},{"title":"AI","includeFiles":["docs/ai/*.md"],"excludeFiles":[]},{"title":"Account Management","includeFiles":["docs/account-management/**/*.md"],"excludeFiles":[]},{"title":"Databoards","includeFiles":["docs/databoards/**/*.md"],"excludeFiles":[]},{"title":"Data Management","includeFiles":["docs/data-management/**/*.md"],"excludeFiles":[]},{"title":"Metrics","includeFiles":["docs/metrics/**/*.md"],"excludeFiles":[]},{"title":"Forecasts","includeFiles":["docs/forecasts/*.md"],"excludeFiles":[]},{"title":"Goals","includeFiles":["docs/goals/*.md"],"excludeFiles":[]},{"title":"Reports","includeFiles":["docs/reports/*.md"],"excludeFiles":[]},{"title":"Notifications","includeFiles":["docs/notifications/*.md"],"excludeFiles":[]},{"title":"Pricing and Billing","includeFiles":["docs/pricing-and-billing/*.md"],"excludeFiles":[]},{"title":"Mobile","includeFiles":["docs/mobile/*.md"],"excludeFiles":[]},{"title":"Support","includeFiles":["docs/support/*.md"],"excludeFiles":[]},{"title":"Integrations","includeFiles":["docs/integrations/**/*.md"],"excludeFiles":[]}],"hide":false,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"add-a-calculated-column-to-a-dataset","__idx":0},"children":["Add a calculated column to a dataset"]},{"$$mdtype":"Tag","name":"Availability","attributes":{"users":"users","accounts":"all","plans":"exclusive"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Calculated columns let you create new values in your dataset by applying custom logic or transformations to your existing data. This is especially useful when you need to:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Normalize or reformat values for comparison or visualization"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Combine multiple columns into a single result"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Apply conditional logic (e.g., flagging results based on thresholds)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Perform mathematical operations that aren't available by default"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Instead of modifying your source data, calculated columns give you a flexible way to enrich it — right inside the dataset editor."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"add-a-calculated-column-to-a-dataset-1","__idx":1},"children":["Add a calculated column to a dataset"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Datasets"]}," page and find the dataset you want to update."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["down arrow"]}," (",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/chevron-down.dfd0e90adc6eb576be32262463090aae7c7f5408ed7975e3795f69775e36d174.419bb737.svg","alt":"chevron-down"},"children":[]},") next to the dataset name and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Edit data"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the dataset editing mode, click the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ bar"]}," at the far right of the table to open the formula input field above the dataset."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter your formula using supported functions, operators, column references, and values."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/play-fill.35a7138bd1b337b171af4171a9e930d7589c283ae4e083fa01002f46c98bcebe.419bb737.svg","alt":"play"},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run"]}," to preview how the new column will look across all rows."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If everything looks good, click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]}," in the top right corner to apply your changes."]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/add-a-calculated-column-to-a-dataset.93968091fab054a0fb2a649be4f3c25f5628eb6444eed03bfb0a533f2195e88a.2fc30de7.png","alt":"add-a-calculated-column-to-a-dataset","withLightbox":true,"className":"ss-img"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"helpful-shortcuts","__idx":2},"children":["Helpful shortcuts"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To speed up formula building and reduce the chance of errors, use the following keyboard shortcuts:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Ctrl + Space"]}," — Opens a list of all supported functions you can use in formulas."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["$"]}," — Displays a dropdown of available columns you can insert as parameters."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These shortcuts make it easier to build accurate formulas without needing to memorize every function or column name."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"formula-validation-and-supported-inputs","__idx":3},"children":["Formula validation and supported inputs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The formula field only accepts specific input types and supports formulas up to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["10,000 characters"]},". If your formula contains unsupported elements or syntax errors, an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["error message will be displayed"]}," and you'll need to correct the formula before you can run or save it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Supported inputs include:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Functions"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Operators"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Numeric values*"]}," (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["10"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3.14"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Text values"]},", enclosed in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["single quotes"]}," (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'Completed'"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Column references"]},", using the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["$"]}," symbol (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$Status"]},"), and double quotes (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$\"Project-Name\""]},") if the column name includes spaces or special characters"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["* In dataset columns, logical values are automatically cast as numbers — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," becomes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," becomes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Any input outside of these types will be flagged as invalid."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"Callout","attributes":{"type":"caution"},"children":["Certain characters — such as parentheses, commas, or symbols — are reserved and may cause issues when parsing or validating your formula. To avoid errors, make sure your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["column names don’t include special characters"]},", or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["rename columns"]}," before referencing them in a formula."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To help you get started, all supported ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#operators"},"children":["operators"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#functions"},"children":["functions"]}," are organized by category below."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"operators","__idx":4},"children":["Operators"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Operators perform basic operations on values or expressions. You can think of them as the \"glue\" that connects, compares, or transforms values within formulas."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Below is a quick overview of the different types of operators. Click a category below to jump to its full explanation."]},{"$$mdtype":"Tag","name":"Cards","attributes":{"columns":3,"cardMinWidth":240},"children":[{"$$mdtype":"Tag","name":"Card","attributes":{"title":"","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"center","variant":"elevated","to":"#arithmetic-operators"},"children":[{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/data-calculations.c98ff74aaef84911a5cbf3e3f87759023ac7d3458d1f9547111b883b82a0702a.419bb737.svg","alt":"arithmetic-operators","withLightbox":false,"style":"height: 48px;"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Arithmetic Operators"]}]}]},{"$$mdtype":"Tag","name":"Card","attributes":{"title":"","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"center","variant":"elevated","to":"#comparison-operators"},"children":[{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/theme.46f2e14f23228d70c60b1646e3a42b058ba080d7a84b24f1e3c1fd83bcc31335.419bb737.svg","alt":"comparison-operators","withLightbox":false,"style":"height: 48px;"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Comparison Operators"]}]}]},{"$$mdtype":"Tag","name":"Card","attributes":{"title":"","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"center","variant":"elevated","to":"#logical-and-conditional-operators"},"children":[{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/shuffle.57a3ceecf5c2f7c6004dbf4b725606201a469e5f8a80436550249eed81f77df8.419bb737.svg","alt":"logical-and-conditional-operators","withLightbox":false,"style":"height: 48px;"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Logical and Conditional Operators"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"arithmetic-operators","__idx":5},"children":["Arithmetic Operators"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These are basic math symbols used to calculate values."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/bulb.15e2e40f464cc9812981ecfefac6f4df74e56779ba2070871cdde55422d09b97.419bb737.svg","alt":"bulb"},"children":[]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["If formulas are recipes, numeric operators are the math utensils you use to prepare your ingredients."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"class":"table-header-col","className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Operator"},"children":["Operator"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Result"},"children":["Result"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["+"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Addition"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2 + 3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subtraction"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2 - 3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["*"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Multiplication"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2 * 3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["6"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Division"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5 / 2"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2.5"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["//"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer Division (quotient)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5 // 2"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["%"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Modulo (remainder)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5 % 4"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["^"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Exponent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3 ^ 4"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["81"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["!"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Factorial"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4!"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["24"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"comparison-operators","__idx":6},"children":["Comparison Operators"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["They evaluate the relationship between two values and return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},". They are commonly used in formulas to compare numbers, text, or column values."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/bulb.15e2e40f464cc9812981ecfefac6f4df74e56779ba2070871cdde55422d09b97.419bb737.svg","alt":"bulb"},"children":[]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["You can think of comparison operators like yes/no questions you ask about your data to evaluate relationships between values."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"class":"table-header-col","className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Operator"},"children":["Operator"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Result"},"children":["Result"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["<"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Less than"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5 < 10"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Greater than"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5 > 10"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["<="]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Less than or equal to"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5 <= 5"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[">="]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Greater than or equal to"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5 >= 6"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["="]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equal"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5 = 5"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["!="]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not equal"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5 != 3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"logical-and-conditional-operators","__idx":7},"children":["Logical and Conditional Operators"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These operators evaluate conditions and return true/false or determine outcomes based on logic."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Logical operators"]}," like ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AND"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OR"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NOT"]}," help you build complex conditions by combining simpler ones."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Conditional operators"]}," like ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CASE"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IS NULL"]}," allow you to return specific values depending on which conditions are met."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/bulb.15e2e40f464cc9812981ecfefac6f4df74e56779ba2070871cdde55422d09b97.419bb737.svg","alt":"bulb"},"children":[]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["You can think of logical operators as the building blocks of a test, and conditional expressions as the final decision maker."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"class":"table-header-col","className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Operator"},"children":["Operator"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AND"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["both"]}," conditions are true. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(5 > 3) AND (2 < 4)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CASE WHEN ... THEN ... [ELSE ...] END"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the result corresponding to the first true condition. If no conditions are true, returns the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ELSE"]}," result (if provided). ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CASE WHEN 5 > 10 THEN 'High' WHEN 5 > 3 THEN 'Medium' ELSE 'Low' END"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'Medium'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IS NOT NULL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if the value is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," null. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'abc' IS NOT NULL"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IS NULL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if the value is null. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL IS NULL"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NOT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if the condition is false, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," if the condition is true. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NOT(5 > 3)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OR"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["either"]}," condition is true. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(5 > 3) OR (2 > 4)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"functions","__idx":8},"children":["Functions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Functions perform more advanced, often reusable operations. They take one or more inputs (called arguments) and return a calculated result."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Below is a categorized overview of available functions. Click a category below to jump to its detailed section."]},{"$$mdtype":"Tag","name":"Cards","attributes":{"columns":3,"cardMinWidth":240},"children":[{"$$mdtype":"Tag","name":"Card","attributes":{"title":"","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"center","variant":"elevated","to":"#aggregate-functions"},"children":[{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/sum.070aa6f5941ed7194c9ffacea854ff088a32996a36ed26cdf87b8ad03f9cca69.419bb737.svg","alt":"aggregate-functions","withLightbox":false,"style":"height: 48px;"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Aggregate Functions"]}]}]},{"$$mdtype":"Tag","name":"Card","attributes":{"title":"","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"center","variant":"elevated","to":"#date-and-time-functions"},"children":[{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/calendar-clock.6df5a19313fc176059d64a6537405acc30c6730e57c6f49a90fbf56414b11577.419bb737.svg","alt":"date-and-time-functions","withLightbox":false,"style":"height: 48px;"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Date and Time Functions"]}]}]},{"$$mdtype":"Tag","name":"Card","attributes":{"title":"","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"center","variant":"elevated","to":"#numeric-functions"},"children":[{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/metrics.7a6a0c557ebd02a1bd07200a5ab1509e50653271de0920d1fd3c8f3c9b4e7b63.419bb737.svg","alt":"numeric-functions","withLightbox":false,"style":"height: 48px;"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Numeric Functions"]}]}]},{"$$mdtype":"Tag","name":"Card","attributes":{"title":"","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"center","variant":"elevated","to":"#text-functions"},"children":[{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/medium-text.96a63d13db9e019008ce5883091f9211139ca820593c064d5bffef7ec55ec633.419bb737.svg","alt":"text-functions","withLightbox":false,"style":"height: 48px;"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Text Functions"]}]}]},{"$$mdtype":"Tag","name":"Card","attributes":{"title":"","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"center","variant":"elevated","to":"#utility-functions"},"children":[{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/wrench.8ab6e790f61514b8ca9b8735985ccd6fdace1d3adadc15697aa5f76cfbb1b8ff.419bb737.svg","alt":"utility-functions","withLightbox":false,"style":"height: 48px;"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Utility Functions"]}]}]},{"$$mdtype":"Tag","name":"Card","attributes":{"title":"","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"center","variant":"elevated","to":"#window-functions"},"children":[{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/data-search.ce167013126c1436138573421c30d851c5a4fc486c5563bfb9818e4639a99eae.419bb737.svg","alt":"window-functions","withLightbox":false,"style":"height: 48px;"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Window Functions"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"aggregate-functions","__idx":9},"children":["Aggregate Functions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These perform calculations across multiple rows in a dataset, such as summing values or finding an average."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/bulb.15e2e40f464cc9812981ecfefac6f4df74e56779ba2070871cdde55422d09b97.419bb737.svg","alt":"bulb"},"children":[]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["You can think of aggregate functions as \"summary tools\" — they look at all your data and give you a big-picture number."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"class":"table-header-col","className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Syntax"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AVG(expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Calculates the average (arithmetic mean) of all non-null values in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," across the dataset. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AVG([5, 10, 15])"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["10"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["COUNT(expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Counts the number of non-null values in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," across all rows. If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," is omitted, counts all rows. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["COUNT(['A', 'B', null])"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["COUNTDISTINCT(expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Counts the number of unique (distinct) non-null values in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," across all rows. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["COUNTDISTINCT(['A', 'B', 'A'])"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MAX(expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the maximum value from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," across all rows. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MAX([10, 20, 5])"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["20"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MEDIAN(expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the median value from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," across all rows. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MEDIAN([1, 3, 5])"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MIN(expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the minimum value from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," across all rows. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MIN([10, 20, 5])"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["STDEV(expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the sample standard deviation of values in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," across all rows. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["STDEV([4, 6, 8])"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["STDEVP(expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the population standard deviation of values in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," across all rows. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["STDEVP([4, 6, 8])"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1.63"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(approx.)"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUM(expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the sum of all values in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," across the dataset. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUM([5, 10, 15])"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["30"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VARIANCE(expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the sample variance of values in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," across all rows. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VARIANCE([4, 6, 8])"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VARIANCEP(expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the population variance of values in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," across all rows. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VARIANCEP([4, 6, 8])"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2.67"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(approx.)"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"date-and-time-functions","__idx":10},"children":["Date and Time Functions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Used to extract parts of a date, perform date math, or return the current time."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/bulb.15e2e40f464cc9812981ecfefac6f4df74e56779ba2070871cdde55422d09b97.419bb737.svg","alt":"bulb"},"children":[]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["These are your \"calendar helpers\" — they help you understand when things happen or calculate time-based differences."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"class":"table-header-col","className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Syntax"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DATEADD(date, number, interval)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns a new date by adding the specified ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["interval"]}," units (e.g., 'day', 'month') to the given ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DATEADD('2025-04-01', 7, 'day')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2025-04-08'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DATEDIFF(start_date, end_date, unit)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the number of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unit"]}," intervals (e.g., 'day', 'month') between ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start_date"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["end_date"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DATEDIFF('2025-01-01', '2025-01-10', 'day')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["9"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DATEFORMAT(date, format)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns a text string representing the specified ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]}," in the given ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://duckdb.org/docs/stable/sql/functions/dateformat.html#format-specifiers"},"children":["format"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DATEFORMAT('2025-04-15', '%b %-d, %Y')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Apr 15, 2025"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DAY(date)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the day of the month (1–31) from the given ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DAY('2025-04-15')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["15"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HOUR(date_time)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the hour (0–23) from the given ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date_time"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HOUR('2025-04-15T14:30:00Z')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["14"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MINUTE(date_time)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the minute (0–59) from the given ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date_time"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MINUTE('2025-04-15T14:30:00Z')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["30"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MONTH(date)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the month (1–12) from the given ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MONTH('2025-04-15')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NOW()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the current date and time in Coordinated Universal Time (UTC). ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NOW()"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2025-04-23T10:42:00Z'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["QUARTER(date)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the quarter (1–4) of the year for the given ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["QUARTER('2025-04-15')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SECOND(date_time)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the seconds (0–59) from the given ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date_time"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SECOND('2025-04-15T14:30:45Z')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["45"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TODAY()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the current date with time set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["00:00:00"]}," in Coordinated Universal Time (UTC). ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TODAY()"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2025-04-23'"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WEEK(date)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the ISO week number (1–53) for the given ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WEEK('2025-01-01')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WEEKDAY(date)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the day of the week (0 = Sunday, 6 = Saturday) for the given ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WEEKDAY('2025-04-21')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YEAR(date)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the year from the given ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YEAR('2025-04-15')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2025"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"numeric-functions","__idx":11},"children":["Numeric Functions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These apply mathematical formulas to one or more values."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/bulb.15e2e40f464cc9812981ecfefac6f4df74e56779ba2070871cdde55422d09b97.419bb737.svg","alt":"bulb"},"children":[]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Numeric functions are like a calculator inside your dataset — they help you transform and analyze numerical values."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"class":"table-header-col","className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Syntax"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ABS(number)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the absolute (non-negative) value of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ABS(-5)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CEILING(number)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rounds ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}," up to the nearest integer. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CEILING(4.2)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FLOOR(number)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rounds ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}," down to the nearest integer. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FLOOR(4.8)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MOD(dividend, divisor)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the remainder after dividing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dividend"]}," by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["divisor"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MOD(10, 3)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POWER(number, exponent)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}," raised to the power of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["exponent"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POWER(2, 3)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["8"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SQRT(number)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the square root of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SQRT(9)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"text-functions","__idx":12},"children":["Text Functions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Used to manipulate, transform, or extract information from text strings."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/bulb.15e2e40f464cc9812981ecfefac6f4df74e56779ba2070871cdde55422d09b97.419bb737.svg","alt":"bulb"},"children":[]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["These are your \"text editors\" — perfect for cleaning up or formatting names, tags, and other string data."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"class":"table-header-col","className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Syntax"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CONCAT(value1, value2, ...)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Joins multiple values into a single string. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CONCAT('Data', 'box')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Databox"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CONTAINS(string, substring)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," if the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," contains the specified ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["substring"]},"; otherwise, returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CONTAINS('dashboard', 'board')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ENDSWITH(string, substring)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," if the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," ends with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["substring"]},"; otherwise, returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ENDSWITH('metrics.csv', '.csv')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FIND(string, substring)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the index of the first occurrence of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["substring"]}," in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},". Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}," if not found. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FIND('dashboard', 'board')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["JSONEXTRACT(json_string, path)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the fragment located at the specified ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://jsonpath.com/"},"children":["JSONPath"]}," in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json_string"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["JSONEXTRACT('{\"user\":{\"id\":123,\"name\":\"Alice\"}}', '$.user.id')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["123"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LEFT(string, num_chars)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the first ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["num_chars"]}," characters from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LEFT('Databox', 4)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Data"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LENGTH(string)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the number of characters in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LENGTH('Databox')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["7"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LOWER(string)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Converts all characters in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," to lowercase. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LOWER('Databox')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["databox"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REGEXEXTRACT(string, pattern, [group])"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the specified match ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["group"]}," (0-indexed) from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},", based on the regular expression ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pattern"]},". If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["group"]}," is omitted, it defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REGEXEXTRACT('databox.com', '([a-z]+)\\.com')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["databox"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REGEXREPLACE(string, pattern, new_substring)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," with all text matching the regular expression ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pattern"]}," replaced by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["new_substring"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REGEXREPLACE('abc123def', '([0-9]+)', 'X')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["abcXdef"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REPLACE(string, old_substring, new_substring)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Replaces all occurrences of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["old_substring"]}," in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["new_substring"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["REPLACE('2025-05-01', '-', '/')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2025/05/01"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RIGHT(string, num_chars)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the last ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["num_chars"]}," characters from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RIGHT('Databox', 3)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["box"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SPLITROWS(string, separator)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns one row for each value in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},", split by the specified ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["separator"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SPLITROWS('a;b;c', ';')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["['a', 'b', 'c']"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["STARTSWITH(string, substring)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," if the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," starts with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["substring"]},"; otherwise, returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["STARTSWITH('dashboard', 'dash')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUBSTRING(string, start, [length])"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Extracts a substring from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," starting at the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start"]}," index, with an optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["length"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUBSTRING('Databox', 5, 3)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["box"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TRIM(string)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Removes whitespace from the beginning and end of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TRIM(' Databox ')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Databox"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UPPER(string)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Converts all characters in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," to uppercase. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UPPER('Databox')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DATABOX"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"utility-functions","__idx":13},"children":["Utility Functions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Versatile functions for comparisons, conditionals, and handling nulls or arrays."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/bulb.15e2e40f464cc9812981ecfefac6f4df74e56779ba2070871cdde55422d09b97.419bb737.svg","alt":"bulb"},"children":[]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Utility functions are the \"everyday helpers\" — they let you apply simple if-then logic, set fallbacks for nulls, compare values to find minimums or maximums, or expand arrays into individual rows."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"class":"table-header-col","className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Syntax"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["COALESCE(value1, value2, ...)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the first non-null value from the list. If all values are ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL"]},", the result is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["COALESCE(NULL, 'default', NULL, 'other')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["default"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GREATEST(value1, value2, ...)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the largest value from a list of numbers, strings, or other comparable values. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL"]}," values are ignored unless all values are ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL"]},", in which case the result is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GREATEST(10, 5, 20)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["20"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IF(condition, true_value, false_value)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true_value"]}," if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["condition"]}," is true; otherwise, returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false_value"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IF(5 > 3, 'Yes', 'No')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Yes"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IFNULL(expression, value_if_null)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expression"]}," if it is not ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL"]},"; otherwise, returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["value_if_null"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IFNULL(null, 'N/A')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["N/A"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LEAST(value1, value2, ...)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the smallest value from a list of numbers, text values, or other comparable values. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL"]}," values are ignored unless all values are ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL"]},", in which case the result is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LEAST(10, 5, 20)"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UNNEST(array_expression)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns each element of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array_expression"]},"as a separate row. Often paired with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["JSONEXTRACT"]}," to expand extracted arrays into individual rows. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UNNEST('[\"tech\",\"science\",\"art\"]')"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["['tech','science','art']"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"window-functions","__idx":14},"children":["Window Functions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Functions for row numbering, ranking, and accessing values across partitions."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/bulb.15e2e40f464cc9812981ecfefac6f4df74e56779ba2070871cdde55422d09b97.419bb737.svg","alt":"bulb"},"children":[]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Window functions are the \"look across rows\" tools — they let you assign sequence numbers, compare values within groups, or pull data from preceding or following rows."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"class":"table-header-col","className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Syntax"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FIRSTVALUE(column_expression, order_columns, [partition_columns])"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the first value of the specified column or expression, based on the defined sort order. If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partition_columns"]}," columns are provided, returns the first value within each group. Sort direction defaults to ascending (ASC) if not specified. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FIRSTVALUE($customer_email, '$order_date, $total_amount DESC', '$store_id, $customer_id')"]}," → Returns the first email address associated with each customer in each store, based on order date (earliest first) and total amount (highest first)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LAG(column_expression, order_columns, [partition_columns], [offset], [default_value])"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns a value from a previous row in the sorted data. If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partition_columns"]}," are provided, looks back within each group. If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]}," is not specified, returns the value from the previous row. If no value exists (for example, it's the first row in the group), returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL"]}," or the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["default_value"]},". Sort direction defaults to ascending (ASC) if not specified. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LAG($balance, '$transaction_date', '$account_id', 1, 0)"]},"→ Returns the previous balance for each account, based on transaction date. If it's the first transaction, returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LASTVALUE(column_expression, order_columns, [partition_columns])"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the last value of the specified column or expression, based on the defined sort order. If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partition_columns"]}," are provided, returns the last value within each group. Sort direction defaults to ascending (ASC) if not specified. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LASTVALUE($customer_email, '$order_date, $total_amount DESC', '$store_id, $customer_id')"]},"→ Returns the last email address associated with each customer in each store, based on order date (earliest first) and total amount (highest first)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LEAD(column_expression, order_columns, [partition_columns], [offset], [default_value])"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the value of a column or expression from a later row in the sorted result. If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partition_columns"]}," are provided, looks ahead within each group. If no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offset"]}," is specified, the function defaults to the next row. If no value exists (e.g. it's the last row), returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NULL"]}," or the specified ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["default_value"]},". Sort direction defaults to ascending (ASC) if not specified. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LEAD($order_date, '$order_date ASC', '$customer_id', 1, NOW())"]}," → Returns the date of the next order for each customer. If no future order exists, returns the current date and time."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ROWNUMBER([order_columns], [partition_columns])"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Assigns a sequential number starting from 1 to each row. If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_columns"]}," are provided, rows are numbered based on the specified sort order. If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partition_columns"]}," are provided, numbering restarts within each group. Sort direction defaults to ascending (ASC) if not specified. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ROWNUMBER('$order_date, $total_amount DESC', '$store_id, $customer_id')"]}," → Sorts orders by date (ascending) and total amount (descending), and assigns a row number for each customer in each store, starting from 1."]}]}]}]}]},{"$$mdtype":"Tag","name":"Faq","attributes":{},"children":[{"$$mdtype":"Tag","name":"FaqItem","attributes":{"question":"Can I reference multiple columns in the same formula?"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Yes. You can include as many column references as needed by using the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$"]}]}," symbol before each column name (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$Revenue - $Cost"]},")."]}]},{"$$mdtype":"Tag","name":"FaqItem","attributes":{"question":"Can I use the calculated column to create custom metrics?"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Absolutely. Once saved, calculated columns behave like any other column in your dataset and can be used in metric creation."]}]},{"$$mdtype":"Tag","name":"FaqItem","attributes":{"question":"Will the calculated column update automatically if the source data changes?"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Yes. The calculated column is dynamic — it will recalculate automatically whenever the underlying dataset is refreshed."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[" "]},{"$$mdtype":"Tag","name":"Cards","attributes":{"columns":4,"cardMinWidth":160},"children":[{"$$mdtype":"Tag","name":"FooterCard","attributes":{"title":"Ask Genie","icon":"genie","to":"https://app.databox.com/genie","variant":"elevated"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get instant answers or help with your data using the in-app AI assistant."]}]},{"$$mdtype":"Tag","name":"FooterCard","attributes":{"title":"Talk to an expert","icon":"assistance","to":"https://meetings.hubspot.com/databox-meeting/account-management","variant":"elevated"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For customers: Get help with your setup, strategy, or making the most of Databox."]}]},{"$$mdtype":"Tag","name":"FooterCard","attributes":{"title":"Book a demo","icon":"eye-open","to":"https://meetings.hubspot.com/databox-meeting/ref-knowledge-base","variant":"elevated"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["New to Databox? See how it works and get guidance on getting started."]}]},{"$$mdtype":"Tag","name":"FooterCard","attributes":{"title":"Send an email","icon":"help","to":"mailto:help@databox.com","variant":"elevated"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Reach out to support for help with your account, data, or technical issues."]}]}]}]},"headings":[{"value":"Add a calculated column to a dataset","id":"add-a-calculated-column-to-a-dataset","depth":1},{"value":"Add a calculated column to a dataset","id":"add-a-calculated-column-to-a-dataset-1","depth":2},{"value":"Helpful shortcuts","id":"helpful-shortcuts","depth":3},{"value":"Formula validation and supported inputs","id":"formula-validation-and-supported-inputs","depth":3},{"value":"Operators","id":"operators","depth":2},{"value":"Arithmetic Operators","id":"arithmetic-operators","depth":3},{"value":"Comparison Operators","id":"comparison-operators","depth":3},{"value":"Logical and Conditional Operators","id":"logical-and-conditional-operators","depth":3},{"value":"Functions","id":"functions","depth":2},{"value":"Aggregate Functions","id":"aggregate-functions","depth":3},{"value":"Date and Time Functions","id":"date-and-time-functions","depth":3},{"value":"Numeric Functions","id":"numeric-functions","depth":3},{"value":"Text Functions","id":"text-functions","depth":3},{"value":"Utility Functions","id":"utility-functions","depth":3},{"value":"Window Functions","id":"window-functions","depth":3}],"frontmatter":{"slug":"add-a-calculated-column-to-a-dataset","seo":{"title":"Add a calculated column to a dataset","description":"Learn how to create new columns in your dataset using custom formulas. Includes helpful tips, examples, and guidance for effective use."},"keywords":{"includes":["calculated column","add calculated column to dataset Databox","custom formula dataset Databox","how to create calculated fields in Databox","Databox dataset column formula","conditional logic in Databox dataset","aggregate functions Databox dataset"]},"metadata":{"userRole":"Users, Editors, and Admins","accountType":"All accounts","plan":"Exclusive to select subscription plans"}},"lastModified":"2026-04-05T19:27:28.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/add-a-calculated-column-to-a-dataset","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}