Applies a SQL window function to another measure, such as a running total, rank, or lag.
Applies a SQL window function to the result of another measure, such as a running total, a rank within a group, or the value from a previous row. Use partition_by to split the rows into separate windows, order_by to sort the rows within each window, and offset_start/offset_end to set the frame of rows the function considers.The measure’s sql must reference other measures, not raw columns or dimensions. Define the aggregate you want to apply the window function to as its own measure first.
Window measures can only be edited in the model IDE.
How it works
This cumulative_arr_change measure takes the arr_change measure and sums it again, creating a running total ordered by date:
SELECT arr_dates.date, SUM(arr_change) OVER (ORDER BY arr_dates.date) AS "cumulative_arr_change"FROM ( SELECT arr_dates.date, SUM(change) AS arr_change FROM arr_dates GROUP BY arr_dates.date) arr_change_by_date
The inner query computes arr_change per date, same as it would without a window. The window block then tells Omni to apply the measure’s sql — SUM(${arr_change}) — as a window function over those per-date rows, ordered by arr_dates.date. Because neither offset_start or offset_end is set, the frame defaults to every row from the start of the partition through the current row, producing a running total.
Contain only alphanumeric characters and underscores
Hide measure_name properties
object
Makes the measure a SQL window function, applied to the measure’s own sql.
Hide window properties
array
An array of dimension references, specified as <view>.<field>. Splits the rows into separate windows; the window function restarts in each partition. Fields referenced here are automatically added to the query.
array
An array of sort entries that order the rows within each window.
Hide order_by properties
string
required
The field to sort by, specified as <view>.<field>. This field is automatically added to the query.
boolean
default:"false"
Sorts the field in descending order when true. Defaults to ascending order.
string
Controls where null values sort, either nulls_first or nulls_last.
integer
Where the window frame starts, counted from the current row: negative for rows before it, 0 for the current row, positive for rows after it. Omit to start the frame at the first row of the partition.Note: Ranking and offset functions (RANK, ROW_NUMBER, LAG, and similar) don’t take a frame, so offset_start and offset_end don’t apply to these functions.
integer
Where the window frame ends, counted from the current row the same way as offset_start. Omit to end the frame at the current row when order_by is set, or at the last row of the partition when it isn’t.
string
default:"rows"
What offset_start and offset_end count: rows, or range, the units of the single order_by value, so rows that share a value share a frame. Defaults to rows once an offset is set.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Omni Docs","colors":{"primary":"#FF5FA2","light":"#FF5FA2","dark":"#4D122C"},"logo":{"light":"https://mintcdn.com/omni-e7402367/m1fg0tfdkEcnYhky/images/logo/omni-black.png?fit=max\u0026auto=format\u0026n=m1fg0tfdkEcnYhky\u0026q=85\u0026s=85b81b605382b15b60eb75159899002a","dark":"https://mintcdn.com/omni-e7402367/m1fg0tfdkEcnYhky/images/logo/omni-white.png?fit=max\u0026auto=format\u0026n=m1fg0tfdkEcnYhky\u0026q=85\u0026s=18b529bed326b4f1be9d58ac65b9e002"},"favicon":"https://mintcdn.com/omni-e7402367/WTWdmWXPOMD5jOUY/favicon.png?fit=max\u0026auto=format\u0026n=WTWdmWXPOMD5jOUY\u0026q=85\u0026s=775ee4acbc06107599e3471e50161a2b","background":{"color":{"light":"#FCFCF7","dark":"#0e0b0e"}},"navbar":{"links":[{"href":"https://community.omni.co","label":"Community"}],"primary":{"type":"button","label":"Try Omni!","href":"https://omni.co/demo"}},"footer":{},"seo":{"metatags":{"canonical":"https://docs.omni.co"}},"fonts":{"heading":{"family":"Cal Sans","weight":400},"body":{"family":"IBM Plex Sans"}},"integrations":{"ga4":{"measurementId":"G-ZMG0QT2W9L"}},"banner":{"content":"Need help? Get answers from the docs with Omni's in-app AI! Log in to your Omni instance and open the [Omni Agent](/ai/chat) in the sidebar.","dismissible":true},"thumbnails":{"appearance":"dark","background":"https://mintcdn.com/omni-e7402367/J1q2UvTSjLHOwJ3G/images/og/og-background.png?fit=max\u0026auto=format\u0026n=J1q2UvTSjLHOwJ3G\u0026q=85\u0026s=63ad1c86bdbf4da4196959c391afb21f","fonts":{"family":"IBM Plex Sans"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"omni-e7402367","hasAudioNarration":false,"actualSubdomain":"omni-e7402367","customDomains":["docs.omni.co"],"gitSource":{"type":"github","owner":"exploreomni","repo":"mintlify-omni","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6afb5b22670920475460064f","clientVersion":"0.0.4149","searchFilterCounts":[{"language":"default","tag":"Docs","count":507},{"language":"default","tag":"Developers","count":382},{"language":"default","tag":"Model data","count":304},{"language":"default","tag":"REST APIs","count":257},{"language":"default","tag":"Parameters","count":188},{"language":"default","tag":"Product updates","count":162},{"language":"default","tag":"Demos","count":158},{"language":"default","tag":"Admin","count":126},{"language":"default","tag":"Visualize \u0026 present","count":98},{"language":"default","tag":"Embedding","count":87}],"searchSettings":{"isFiltersEnabled":true,"maxResults":10,"fullPageSearch":true}},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":false}},"googleFontsInlined":true},"customCss":[{"filePath":"styles.css","content":"img{border:1px solid;border-color:rgb(var(--gray-200))}.no-border{border:0px}.nav-logo{border:0px}#banner{color:#FCFCF7;font-weight:600;a {\n color: #FCFCF7;\n font-weight: 600;\n }}#topbar-cta-button{background-color:#FF5FA2;color:#FCFCF7!important;padding:0;border-radius:160px;text-decoration:none;font-weight:800;cursor:pointer;transition:background-color 0.2s ease, transform 0.1s ease}#topbar-cta-button span{background-color:transparent!important}#topbar-cta-button>a{padding:8px 14px!important}#topbar-cta-button *{color:#FCFCF7!important}#topbar-cta-button:hover{background-color:#FF5FA2;transform:translateY(-1px)}#topbar-cta-button:active{transform:translateY(0)}#topbar-cta-button svg{display:none!important}.navbar-link a{border-radius:160px!important}.dark .navbar-link a{background-color:rgb(255 255 255 / 0.1)!important}.dark .navbar-link a:hover{background-color:rgb(255 255 255 / 0.2)!important}[data-testid=\"rss-feed-button\"]{border-color:#FF5FA2!important;color:#FF5FA2!important;border-radius:160px!important;gap:6px;transition:background-color 0.2s ease, transform 0.1s ease}[data-testid=\"rss-feed-button\"]::after{content:\"Subscribe\";font-size:14px;font-weight:600}[data-testid=\"rss-feed-button\"] svg{stroke:#FF5FA2}[data-testid=\"rss-feed-button\"]:hover{background-color:rgba(255, 95, 162, 0.05)!important;transform:translateY(-1px)}.dark [data-testid=\"rss-feed-button\"]:hover{background-color:rgba(255, 95, 162, 0.1)!important}[class*=\"cursor-copy\"][class*=\"max-h-\"]{max-height:20px!important}:has(>.guide-header){position:relative;max-width:1100px;margin:0 auto;padding:24px 24px 72px calc(200px + 48px + 24px);color:rgb(var(--gray-700))}.dark :has(>.guide-header){color:rgb(var(--gray-400))}.guide-header{position:sticky;top:var(--scroll-mt, 9.5rem);z-index:20;background-color:#FCFCF7;padding:0px 0px 1px;margin-bottom:35px;box-shadow:0 -10rem 0 10rem #FCFCF7}.dark .guide-header{background-color:#0e0b0e;box-shadow:0 -10rem 0 10rem #0e0b0e}.guide-title{font-size:2.5rem;font-weight:700;color:rgb(var(--gray-900));margin:0;line-height:1.3}.dark .guide-title{color:rgb(var(--gray-50))}.guide-sidebar{position:absolute;left:24px;top:24px;bottom:0;width:200px}.guide-sidebar-content{position:sticky;top:calc(var(--scroll-mt, 9.5rem) + 10px)}.guide-sidebar-back{display:flex;align-items:center;gap:8px;color:rgb(var(--gray-500));text-decoration:none;font-size:14px;font-weight:500;margin-bottom:24px;transition:color 0.15s ease}.guide-sidebar-back:hover{color:rgb(var(--primary))}.guide-sidebar-section{margin-bottom:20px}.guide-sidebar-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:rgb(var(--gray-500));margin-bottom:6px}.guide-sidebar-category{display:flex;align-items:center;gap:6px;font-size:14px;color:rgb(var(--gray-700));text-transform:capitalize}.dark .guide-sidebar-category{color:rgb(var(--gray-300))}.guide-sidebar-date{font-size:14px;color:rgb(var(--gray-600))}.dark .guide-sidebar-date{color:rgb(var(--gray-400))}.guide-sidebar-links{list-style:none;padding:0;margin:0}.guide-sidebar-links li{margin-bottom:6px}.guide-sidebar-progress{display:flex;align-items:center;gap:12px}.guide-mascot{flex-shrink:0}.guide-mascot svg{display:block}.guide-sidebar-progress-text{font-size:14px;font-weight:600;color:rgb(var(--gray-600))}.dark .guide-sidebar-progress-text{color:rgb(var(--gray-400))}.guide-sidebar-links a{font-size:14px;color:rgb(var(--primary));text-decoration:none}:has(>.guide-header) .guide-sidebar a{border-bottom:none;font-weight:inherit}:has(>.guide-header) a.guide-sidebar-back{color:rgb(var(--gray-500));font-weight:500}:has(>.guide-header) a.guide-sidebar-back:hover{color:rgb(var(--primary))}:has(>.guide-header) .guide-sidebar-links a{color:rgb(var(--primary))}:has(>.guide-header) .guide-sidebar-links a:hover{text-decoration:underline}@media (max-width: 768px){:has(>.guide-header){padding:24px 24px 72px 24px}.guide-sidebar{position:static;width:100%;margin-bottom:24px}.guide-sidebar-content{position:static;display:flex;flex-wrap:wrap;align-items:center;gap:12px}.guide-sidebar-back{width:100%;margin-bottom:4px}.guide-sidebar-section{margin-bottom:0}.guide-sidebar-section:has(.guide-sidebar-progress),.guide-sidebar-section:has(.guide-sidebar-links){display:none}.guide-sidebar-label{display:none}.guide-sidebar-category,.guide-sidebar-date{font-size:12px;padding:4px 10px;border-radius:4px;background-color:#f1f5f9;color:#1e191a}.dark .guide-sidebar-category,.dark .guide-sidebar-date{background-color:rgba(255, 255, 255, 0.03);color:rgb(250, 245, 247)}.guide-header{position:static;box-shadow:none}.guide-sticky-header{padding:12px 16px}.guide-progress-track{margin:-12px -16px 12px}.guide-sticky-title{font-size:1.5rem}}:has(>.guide-header) h1,:has(>.guide-header) h2,:has(>.guide-header) h3{color:rgb(var(--gray-900))}.dark :has(>.guide-header) h1,.dark :has(>.guide-header) h2,.dark :has(>.guide-header) h3{color:rgb(var(--gray-50))}:has(>.guide-header) h1{font-size:2.25rem;font-weight:700;margin:0 0 16px 0;line-height:1.2}:has(>.guide-header) h2{font-size:1.5rem;font-weight:600;margin:32px 0 16px 0;line-height:1.3}:has(>.guide-header) [data-component-part=\"step-title\"]{margin:0 0 16px 0}:has(>.guide-header) h3{font-size:1.25rem;font-weight:600;margin:24px 0 12px 0;line-height:1.4}:has(>.guide-header) p,:has(>.guide-header) [data-as=\"p\"]{display:block;margin:16px 0;line-height:1.7}:has(>.guide-header)>.guide-header+p,:has(>.guide-header)>.guide-header+[data-as=\"p\"]{margin-top:0}:has(>.guide-header) ul:not(.not-prose),:has(>.guide-header) ol:not(.not-prose){margin:16px 0;padding-left:24px}:has(>.guide-header) ul:not(.not-prose){list-style-type:disc}:has(>.guide-header) ol:not(.not-prose){list-style-type:decimal!important}:has(>.guide-header) :not(.not-prose)>li{margin-bottom:8px;line-height:1.6}:has(>.guide-header) .prose ul:not(.not-prose){list-style-type:none;padding-left:0}:has(>.guide-header) .prose :not(.not-prose)>li{margin-bottom:0}:has(>.guide-header) a{color:rgb(17, 24, 39);text-decoration:none;font-weight:600;border-bottom:1px solid rgb(var(--primary))}.dark :has(>.guide-header) a{color:rgb(var(--gray-50))}:has(>.guide-header) a:hover{border-bottom-width:2px}:has(>.guide-header) strong{font-weight:600;color:rgb(var(--gray-900))}.dark :has(>.guide-header) strong{color:rgb(var(--gray-50))}:has(>.guide-header) code{font-size:0.9em}:has(>.guide-header) table{width:100%;border-collapse:collapse;margin:16px 0}:has(>.guide-header) th{text-align:left;font-weight:600;padding:8px 16px 8px 0;border-bottom:1px solid rgb(var(--gray-200));color:rgb(var(--gray-900))}.dark :has(>.guide-header) th{border-bottom-color:rgb(var(--gray-700));color:rgb(var(--gray-50))}:has(>.guide-header) td{padding:12px 16px 12px 0;border-bottom:1px solid rgb(var(--gray-200));vertical-align:top}.dark :has(>.guide-header) td{border-bottom-color:rgb(var(--gray-700))}:has(>.guide-header) img{margin:16px 0;border-radius:8px}:has(>.guide-header) [data-component-part=\"card-title\"]{font-size:1rem!important;margin:4px 0 0 0!important}:has(>.guide-header) [data-component-part=\"card-content\"]{font-size:0.875rem!important;line-height:1.5!important}:has(>.guide-header) [data-component-part=\"card-content\"] [data-as=\"p\"]{font-size:0.875rem!important;margin:4px 0!important;line-height:1.5!important}.guides-container{max-width:1200px;margin:0 auto;padding:48px 24px}.guides-title{font-size:2.5rem;font-weight:700;color:#1e191a;margin-bottom:16px}.dark .guides-title{color:#e6e1e2}.guides-description{font-size:1.125rem;color:#1e191a;margin-bottom:32px}.dark .guides-description{color:#cbd5e1}.guides-layout{display:flex;gap:48px}.guides-sidebar{width:220px;flex-shrink:0}.guides-filters{position:sticky;top:100px;max-height:calc(100vh - 124px);overflow-y:auto;scrollbar-width:thin}.guides-filters::-webkit-scrollbar{width:6px}.guides-filters::-webkit-scrollbar-thumb{background:rgba(128, 128, 128, 0.35);border-radius:3px}.guides-filter-group{margin-bottom:24px}.guides-filter-label{display:block;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#1e191a;margin-bottom:8px}.dark .guides-filter-label{color:#cbd5e1}.guides-filter-input{width:100%;padding:8px 12px;border-top-left-radius:9999px;border-top-right-radius:9999px;border-bottom-left-radius:9999px;border-bottom-right-radius:9999px;border-color:rgb(230, 225, 226);font-size:14px;box-sizing:border-box;background-color:rgba(17, 12, 14, 0.03);color:rgb(119, 114, 116)}.dark .guides-filter-input{background-color:rgba(255, 255, 255, 0.03);border-color:#334155;color:rgba(255, 255, 255, 0.5)}.guides-filter-input:focus{outline:none;border-color:#FF5FA2}.dark .guides-filter-input::placeholder{color:rgba(255, 255, 255, 0.5)}.guides-filter-button{display:block;width:100%;padding:8px 12px;margin-bottom:4px;border-radius:160px;border:1px solid #e2e8f0;background:transparent;font-size:14px;text-align:left;cursor:pointer;transition:all 0.15s ease;color:#334155}.dark .guides-filter-button{color:#cbd5e1;border-color:rgba(255, 255, 255, 0.1);border-style:solid;border-width:1.5px}.guides-filter-button:hover{background-color:#f8fafc}.dark .guides-filter-button:hover{background-color:#0e0b0e;border-color:#FF5FA2}.guides-filter-button.active{border-color:#FF5FA2;background-color:#fff0f6;color:#FF5FA2}.dark .guides-filter-button.active{background-color:rgba(255, 95, 162, 0.15)}.guides-clear-button{width:100%;padding:10px 12px;margin-bottom:16px;border:1px solid #e2e8f0;border-radius:160px;background:#f8fafc;color:#334155;font-size:14px;font-weight:500;cursor:pointer;transition:all 0.15s ease}.dark .guides-clear-button{background:#0e0b0e;color:#e2e8f0;border-color:rgba(255, 255, 255, 0.1);border-style:solid;border-width:1.5px}.guides-clear-button:hover{background:#f1f5f9;border-color:#cbd5e1}.dark .guides-clear-button:hover{background:#0e0b0e;border-color:#FF5FA2}.guides-content{flex:1;min-width:0}.guides-results-count{font-size:14px;color:#1e191a;margin-bottom:16px}.dark .guides-results-count{color:#cbd5e1}.guides-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));gap:16px}.guides-card{border:1px solid #e2e8f0;border-radius:16px;padding:20px;text-decoration:none;color:inherit;display:flex;flex-direction:column;gap:12px;transition:border-color 0.15s ease, box-shadow 0.15s ease;background-color:#FCFCF7}.dark .guides-card{border-color:rgba(255, 255, 255, 0.1);border-style:solid;border-width:1.5px;background-color:#0e0b0e}.guides-card:hover{border-color:#FF5FA2;box-shadow:0 2px 8px rgba(0, 0, 0, 0.08)}.dark .guides-card:hover{box-shadow:0 2px 8px rgba(0, 0, 0, 0.3)}.guides-card-icon{margin-bottom:4px}.guides-card-title{font-size:16px;font-weight:600;color:#1e191a;margin:0;line-height:1.3}.dark .guides-card-title{color:#FCFCF7}.guides-card-description{font-size:16px;color:#575254;margin:0;line-height:1.5;flex-grow:1}.dark .guides-card-description{color:#a6a1a2}.guides-card-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.guides-card-tag{font-size:12px;padding:2px 8px;border-radius:4px;background-color:#f1f5f9;color:#1e191a}.dark .guides-card-tag{background-color:rgba(255, 255, 255, 0.03);color:rgb(250, 245, 247)}.guides-no-results{text-align:center;padding:48px 24px;color:#1e191a}.dark .guides-no-results{color:#cbd5e1}@media (max-width: 768px){.guides-layout{flex-direction:column;gap:24px}.guides-sidebar{width:100%}.guides-filters{position:static;max-height:none;overflow-y:visible}.guides-filter-button{display:inline-block;width:auto;margin-right:8px}}.badge-color{background-color:#FF5FA2;color:#FCFCF7!important}.lib-page{--lib-muted: #575254;color:#1e191a}.dark .lib-page{--lib-muted: #a6a1a2;color:#e6e1e2}.lib-page a{color:#FF5FA2}.lib-card:hover{border-color:#FF5FA2!important}.lib-panel{background-color:#FCFCF7;color:#1e191a;height:100vh;height:100dvh;max-height:100dvh}.dark .lib-panel{background-color:#0e0b0e;color:#e6e1e2}.lib-logo-chip{display:inline-flex;align-items:center;justify-content:center;flex:none;overflow:hidden}.dark .lib-logo-chip{padding:3px 5px;border-radius:5px;background-color:#ffffff}.lib-logo-chip img{border:0;border-radius:0}.endpoint-table{table-layout:fixed}.endpoint-table th:first-child,.endpoint-table td:first-child{width:18rem;min-width:18rem;max-width:18rem}.endpoint-table th:last-child,.endpoint-table td:last-child{width:8rem;min-width:8rem;max-width:8rem}.icon{border:0px}.icons{background-color:#000000}.dark .icons{background-color:rgb(var(--gray-50))}.icon-position{display:inline;vertical-align:middle}.dbt-health-good{color:#178250}.dbt-health-warning{color:#FFBD14}.dbt-health-failure{color:#E42F2F}.dbt-health-unknown{color:#676F7E}.dark .dbt-health-good{color:#68B691}.dark .dbt-health-warning{color:#FDD97C}.dark .dbt-health-failure{color:#FF9F8A}.dark .dbt-health-unknown{color:#B7BDC8}.dbt-health-mark{color:#676F7E}.dark .dbt-health-mark{color:#B7BDC8}.dbt-health-ring{fill:#FCFCF7}.dark .dbt-health-ring{fill:#0e0b0e}[data-component-part=\"accordion-icon\"] svg{display:block!important}.side-by-side{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:1.5rem;margin:1.5rem 0}.side-by-side-reverse{flex-direction:row}.side-by-side-divider{padding-bottom:1.5rem;border-bottom:1px solid rgb(var(--gray-200))}.dark .side-by-side-divider{border-bottom-color:rgb(var(--gray-700))}.side-by-side-media{flex:0 0 45%;display:flex;flex-direction:column;align-items:center;margin:0}.side-by-side-media img{width:auto;height:auto;max-width:100%;max-height:var(--side-by-side-height, 220px);margin:0}.side-by-side-caption{margin-top:0.75rem;padding:0 2rem 0.5rem;text-align:center;font-size:0.875rem;line-height:1.25rem;color:rgb(var(--gray-700))}.dark .side-by-side-caption{color:rgb(var(--gray-400))}.side-by-side-body{flex:1;min-width:0}.side-by-side-body p,.side-by-side-body [data-as=\"p\"]{display:block;margin:1rem 0}.side-by-side-body .side-by-side-title{margin:0 0 0.5rem;font-weight:600;color:rgb(var(--gray-900))}.dark .side-by-side-body .side-by-side-title{color:rgb(var(--gray-50))}.side-by-side-body>:first-child{margin-top:0}.side-by-side-body>:last-child{margin-bottom:0}@media (max-width: 768px){.side-by-side,.side-by-side-reverse{flex-direction:column;align-items:stretch}.side-by-side-media{flex:1 1 auto}}#page-title,:has(>.guide-header) h1,.guides-title{font-weight:400;line-height:1;letter-spacing:0;text-wrap:pretty}#page-title{font-size:2rem}@media (min-width: 40rem){#page-title{font-size:2.625rem}}h2,h3,h4,h5,h6{font-family:var(--font-family-body-custom)}.mdx-content :is(h2,h3,h4,h5,h6):not([data-component-part]):not(.not-prose){font-weight:500;line-height:1.15;letter-spacing:0;text-wrap:pretty}.mdx-content h2:not([data-component-part]):not(.not-prose){font-size:1.5rem}"}],"page":{"pagePath":"modeling/measures/parameters/window","slug":"/modeling/measures/parameters/window","pageMetadata":{"title":"window - Measures","sidebarTitle":"window","description":"Applies a SQL window function to another measure, such as a running total, rank, or lag.","keywords":["window","window function","running total","cumulative sum","rank","lag","partition_by","order_by"],"href":"/modeling/measures/parameters/window"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Applies a SQL window function to another measure, such as a running total, rank, or lag.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,Note,ParamField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Applies a SQL window function to the result of another measure, such as a running total, a rank within a group, or the value from a previous row. Use `,_jsx(_components.code,{children:`partition_by`}),` to split the rows into separate windows, `,_jsx(_components.code,{children:`order_by`}),` to sort the rows within each window, and `,_jsx(_components.code,{children:`offset_start`}),`/`,_jsx(_components.code,{children:`offset_end`}),` to set the frame of rows the function considers.`]}),`\n`,_jsxs(_components.p,{children:[`The measure’s `,_jsx(_components.code,{children:`sql`}),` must reference other measures, not raw columns or dimensions. Define the aggregate you want to apply the window function to as its own measure first.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Window measures can only be edited in the model IDE.`})}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.p,{children:[`This `,_jsx(_components.code,{children:`cumulative_arr_change`}),` measure takes the `,_jsx(_components.code,{children:`arr_change`}),` measure and sums it again, creating a running total ordered by date:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Model`,numberOfLines:`5`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`cumulative_arr_change`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` sql`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"SUM(${arr_change})\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` order_by`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`field`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`arr_dates.date`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`SQL equivalent`,numberOfLines:`8`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` arr_dates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(arr_change) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`OVER`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`ORDER BY`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` arr_dates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cumulative_arr_change\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` SELECT`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` arr_dates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(change) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` arr_change`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` arr_dates`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` GROUP BY`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` arr_dates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`date`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) arr_change_by_date`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`The inner query computes `,_jsx(_components.code,{children:`arr_change`}),` per date, same as it would without a `,_jsx(_components.code,{children:`window`}),`. The `,_jsx(_components.code,{children:`window`}),` block then tells Omni to apply the measure’s `,_jsx(_components.code,{children:`sql`}),` — `,_jsx(_components.code,{children:\"SUM(${arr_change})\"}),` — as a window function over those per-date rows, ordered by `,_jsx(_components.code,{children:`arr_dates.date`}),`. Because neither `,_jsx(_components.code,{children:`offset_start`}),` or `,_jsx(_components.code,{children:`offset_end`}),` is set, the frame defaults to every row from the start of the partition through the current row, producing a running total.`]}),`\n`,_jsx(Heading,{level:`2`,id:`syntax`,children:`Syntax`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`\u003cmeasure_name>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` sql`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cwindow_function_over_measure_refs>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` partition_by`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cview>.\u003cfield>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` order_by`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`field`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cview>.\u003cfield>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` desc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003ctrue_false>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` null_sort`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cnulls_first_nulls_last>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` offset_start`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cinteger>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` offset_end`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cinteger>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` offset_type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003crows_range>`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`properties`,children:`Properties`}),`\n`,_jsxs(ParamField,{path:`measure_name`,type:`object`,id:`param-measure-name`,children:[_jsx(_components.p,{children:`The name of the measure. Measure names must:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Be unique within the view`}),`\n`,_jsx(_components.li,{children:`Start with a letter`}),`\n`,_jsx(_components.li,{children:`Contain only alphanumeric characters and underscores`}),`\n`]}),_jsx(Expandable,{title:`measure_name properties`,defaultOpen:`true`,children:_jsxs(ParamField,{path:`window`,type:`object`,id:`param-window`,children:[_jsxs(_components.p,{children:[`Makes the measure a SQL window function, applied to the measure’s own `,_jsx(_components.code,{children:`sql`}),`.`]}),_jsxs(Expandable,{title:`window properties`,defaultOpen:`true`,children:[_jsx(ParamField,{path:`partition_by`,type:`array`,id:`param-partition-by`,children:_jsxs(_components.p,{children:[`An array of dimension references, specified as `,_jsx(_components.code,{children:`\u003cview>.\u003cfield>`}),`. Splits the rows into separate windows; the window function restarts in each partition. Fields referenced here are automatically added to the query.`]})}),_jsxs(ParamField,{path:`order_by`,type:`array`,id:`param-order-by`,children:[_jsx(_components.p,{children:`An array of sort entries that order the rows within each window.`}),_jsxs(Expandable,{title:`order_by properties`,defaultOpen:`true`,children:[_jsx(ParamField,{path:`field`,type:`string`,required:true,id:`param-field`,children:_jsxs(_components.p,{children:[`The field to sort by, specified as `,_jsx(_components.code,{children:`\u003cview>.\u003cfield>`}),`. This field is automatically added to the query.`]})}),_jsx(ParamField,{path:`desc`,type:`boolean`,default:`false`,id:`param-desc`,children:_jsxs(_components.p,{children:[`Sorts the field in descending order when `,_jsx(_components.code,{children:`true`}),`. Defaults to ascending order.`]})}),_jsx(ParamField,{path:`null_sort`,type:`string`,id:`param-null-sort`,children:_jsxs(_components.p,{children:[`Controls where null values sort, either `,_jsx(_components.code,{children:`nulls_first`}),` or `,_jsx(_components.code,{children:`nulls_last`}),`.`]})})]})]}),_jsxs(ParamField,{path:`offset_start`,type:`integer`,id:`param-offset-start`,children:[_jsxs(_components.p,{children:[`Where the window frame starts, counted from the current row: negative for rows before it, `,_jsx(_components.code,{children:`0`}),` for the current row, positive for rows after it. Omit to start the frame at the first row of the partition.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Note`}),`: Ranking and offset functions (`,_jsx(_components.code,{children:`RANK`}),`, `,_jsx(_components.code,{children:`ROW_NUMBER`}),`, `,_jsx(_components.code,{children:`LAG`}),`, and similar) don’t take a frame, so `,_jsx(_components.code,{children:`offset_start`}),` and `,_jsx(_components.code,{children:`offset_end`}),` don’t apply to these functions.`]})]}),_jsx(ParamField,{path:`offset_end`,type:`integer`,id:`param-offset-end`,children:_jsxs(_components.p,{children:[`Where the window frame ends, counted from the current row the same way as `,_jsx(_components.code,{children:`offset_start`}),`. Omit to end the frame at the current row when `,_jsx(_components.code,{children:`order_by`}),` is set, or at the last row of the partition when it isn’t.`]})}),_jsx(ParamField,{path:`offset_type`,type:`string`,default:`rows`,id:`param-offset-type`,children:_jsxs(_components.p,{children:[`What `,_jsx(_components.code,{children:`offset_start`}),` and `,_jsx(_components.code,{children:`offset_end`}),` count: `,_jsx(_components.code,{children:`rows`}),`, or `,_jsx(_components.code,{children:`range`}),`, the units of the single `,_jsx(_components.code,{children:`order_by`}),` value, so rows that share a value share a frame. Defaults to `,_jsx(_components.code,{children:`rows`}),` once an offset is set.`]})})]})]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(CodeBlock,{filename:`Cumulative sum`,numberOfLines:`6`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`measures`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` cumulative_arr_change`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` sql`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"SUM(${arr_change})\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` order_by`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`field`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`arr_dates.date`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:`Trailing 3-period average`,numberOfLines:`7`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`measures`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` trailing_3_period_arr_change`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` sql`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"AVG(${arr_change})\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` order_by`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`field`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`arr_dates.date`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` offset_start`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`-2`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:`Rank within a partition`,numberOfLines:`8`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`measures`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` arr_change_rank`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` sql`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`RANK()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` partition_by`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`customers.region`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` order_by`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`field`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`arr_change`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` desc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:`Lag`,numberOfLines:`6`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`measures`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` previous_arr_change`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` sql`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"LAG(${arr_change}, 1)\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` order_by`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`field`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`arr_dates.date`})]}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"window - Measures","sidebarTitle":"window","description":"Applies a SQL window function to another measure, such as a running total, rank, or lag.","keywords":["window","window function","running total","cumulative sum","rank","lag","partition_by","order_by"],"href":"/modeling/measures/parameters/window"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Syntax","slug":"syntax","depth":2,"children":[]},{"title":"Properties","slug":"properties","depth":2,"children":[]},{"title":"Examples","slug":"examples","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"omni-e7402367","siteName":"Omni Docs","title":"window - Measures - Omni Docs","relatedPagesConfig":{"enabled":true,"limit":3,"mode":"manual"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-16T19:36:24.686Z","originalFileLocation":"modeling/measures/parameters/window.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Applies a SQL window function to another measure, such as a running total, rank, or lag.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Omni Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"window - Measures - Omni Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Applies a SQL window function to another measure, such as a running total, rank, or lag.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Omni Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.omni.co/modeling/measures/parameters/window\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://omni-e7402367.mintlify.site/_mintlify/api/og/v2?division=Parameters\u0026amp;title=window+-+Measures\u0026amp;description=Applies+a+SQL+window+function+to+another+measure%2C+such+as+a+running+total%2C+rank%2C+or+lag.\u0026amp;theme=f0d77b05d3972e3534869d72\u0026amp;signature=58919288e36e7e4d35a113fce4f2e138af16ee8ccb53f48cc5688493112dcec1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"window - Measures - Omni Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Applies a SQL window function to another measure, such as a running total, rank, or lag.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://omni-e7402367.mintlify.site/_mintlify/api/og/v2?division=Parameters\u0026amp;title=window+-+Measures\u0026amp;description=Applies+a+SQL+window+function+to+another+measure%2C+such+as+a+running+total%2C+rank%2C+or+lag.\u0026amp;theme=f0d77b05d3972e3534869d72\u0026amp;signature=58919288e36e7e4d35a113fce4f2e138af16ee8ccb53f48cc5688493112dcec1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Omni Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF5FA2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.omni.co/modeling/measures/parameters/window\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/modeling/measures/parameters/window.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.omni.co/#organization\",\"name\":\"Omni Docs\",\"url\":\"https://docs.omni.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/omni-e7402367/m1fg0tfdkEcnYhky/images/logo/omni-black.png?fit=max\u0026auto=format\u0026n=m1fg0tfdkEcnYhky\u0026q=85\u0026s=85b81b605382b15b60eb75159899002a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.omni.co#website\",\"name\":\"Omni Docs\",\"url\":\"https://docs.omni.co\",\"publisher\":{\"@id\":\"https://docs.omni.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.omni.co/modeling/measures/parameters/window#webpage\",\"url\":\"https://docs.omni.co/modeling/measures/parameters/window\",\"name\":\"window - Measures\",\"description\":\"Applies a SQL window function to another measure, such as a running total, rank, or lag.\",\"dateModified\":\"2026-11-16T19:36:24.686Z\",\"isPartOf\":{\"@id\":\"https://docs.omni.co#website\"},\"breadcrumb\":{\"@id\":\"https://docs.omni.co/modeling/measures/parameters/window#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.omni.co/modeling/measures/parameters/window#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Model data\",\"item\":\"https://docs.omni.co/modeling\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Measures\",\"item\":\"https://docs.omni.co/modeling/measures\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Parameters\",\"item\":\"https://docs.omni.co/modeling/measures/parameters\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"window - Measures\",\"item\":\"https://docs.omni.co/modeling/measures/parameters/window\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.omni.co/modeling/measures/parameters/window#article\",\"headline\":\"window - Measures\",\"name\":\"window - Measures\",\"description\":\"Applies a SQL window function to another measure, such as a running total, rank, or lag.\",\"url\":\"https://docs.omni.co/modeling/measures/parameters/window\",\"mainEntityOfPage\":{\"@id\":\"https://docs.omni.co/modeling/measures/parameters/window#webpage\"},\"dateModified\":\"2026-11-16T19:36:24.686Z\",\"keywords\":\"window, window function, running total, cumulative sum, rank, lag, partition_by, order_by\",\"publisher\":{\"@id\":\"https://docs.omni.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.omni.co#website\"}}]}\u003c/script>","agentPointerHref":"/modeling/measures/parameters/window.md","siteName":"Omni Docs","nav":{"global":null,"tabs":[{"tab":"Docs","groups":[{"group":"Getting started","icon":"hand-sparkles","pages":[{"title":"Welcome to the Omni docs!","sidebarTitle":"Introduction","mode":"wide","href":""},{"title":"AI in Omni","sidebarTitle":"AI in Omni","href":"/ai/index"},{"title":"Omni for developers","sidebarTitle":"Developers","href":"/getting-started/developers"},{"title":"Onboarding to Omni as a Viewer","sidebarTitle":"Viewers","href":"/getting-started/viewers"},{"title":"Keyboard shortcuts","sidebarTitle":"Keyboard shortcuts","href":"/getting-started/keyboard-shortcuts"},{"title":"Omni Best Practices","sidebarTitle":"Best practices","href":"/getting-started/best-practices"}]},{"group":"Manage content","icon":"book","pages":[{"group":"Navigate","pages":[{"title":"Navigating Omni","sidebarTitle":"Overview","href":"/content/navigate"},{"title":"Searching content","sidebarTitle":"Search content","href":"/content/search"},{"title":"Tracking recent work with the My Activity page","sidebarTitle":"My Activity","href":"/content/activity"}]},{"title":"Organizing content with folders \u0026 labels","sidebarTitle":"Folders and labels","href":"/content/organize"},{"group":"Draft and publish content","pages":[{"title":"Editing \u0026 publishing content","sidebarTitle":"Overview","href":"/content/develop/index"},{"title":"Developing content with Draft-only mode","sidebarTitle":"Draft-only mode","href":"/content/develop/drafts"},{"title":"Developing content and models with Branch Mode","sidebarTitle":"Branch Mode","href":"/content/develop/branch-mode"},{"title":"Common content and model publishing workflows","sidebarTitle":"Common workflows","href":"/content/develop/workflows"}]},{"title":"Content sharing","sidebarTitle":"Share content","href":"/share/index"},{"title":"Archiving and restoring content","sidebarTitle":"Archive and restore content","href":"/content/archive-restore"}]},{"group":"Analyze \u0026 build","icon":"magnifying-glass-chart","pages":[{"title":"Analyze \u0026 build in Omni","sidebarTitle":"Overview","href":"/analyze-explore/index"},{"title":"Build analyses in workbooks","sidebarTitle":"Workbook basics","href":"/analyze-explore/workbook-basics"},{"group":"Query data","root":{"title":"Querying data in Omni","sidebarTitle":"Overview","href":"/analyze-explore/querying"},"pages":[{"group":"With AI","pages":[{"title":"Omni Agent","sidebarTitle":"Standalone AI chat","href":"/ai/chat"},{"title":"Building queries \u0026 filters with AI","sidebarTitle":"Workbook Agent","href":"/ai/queries"},{"title":"Skills","sidebarTitle":"Skills","href":"/ai/skills"},{"title":"AI Routines","sidebarTitle":"Routines","href":"/ai/routines"},{"title":"Generating forecasts with AI","sidebarTitle":"Forecast with AI","href":"/ai/forecasting"}]},{"title":"Building point-and-click queries","sidebarTitle":"Point-and-click","href":"/analyze-explore/point-click-queries"},{"title":"Building workbook queries on topics","sidebarTitle":"Topic-based queries","href":"/analyze-explore/queries/topics"},{"title":"Filters","sidebarTitle":"Filters","href":"/analyze-explore/queries/filters"},{"title":"Saving queries as views","sidebarTitle":"Queries as views","href":"/analyze-explore/saved-views"},{"group":"SQL","pages":[{"title":"Writing SQL in Omni","sidebarTitle":"Write SQL queries","href":"/analyze-explore/sql/index"},{"title":"Understanding SQL generation in Omni","sidebarTitle":"SQL generation","href":"/analyze-explore/sql/generation"},{"title":"Handling fan out with symmetric aggregates","sidebarTitle":"Symmetric aggregates","href":"/analyze-explore/sql/symmetric-aggregates"}]},{"title":"Cross model tabs","sidebarTitle":"Cross model tabs","href":"/analyze-explore/cross-model-tabs"}]},{"group":"Add data","pages":[{"title":"Uploading CSVs with data input tables","sidebarTitle":"CSV \u0026 Excel uploads","href":"/analyze-explore/data-input-csvs"},{"title":"Input columns","sidebarTitle":"Input columns","href":"/analyze-explore/input-columns"}]},{"title":"Formatting \u0026 analyzing data with spreadsheet tabs","sidebarTitle":"Spreadsheets","href":"/analyze-explore/spreadsheet-tabs"},{"group":"Calculations","root":{"title":"Using Excel-style functions to create table calculations","sidebarTitle":"Overview","href":"/analyze-explore/calculations/index"},"pages":[{"title":"Supported table calculation functions","sidebarTitle":"All functions","href":"/analyze-explore/calculations/all"},{"title":"Supported AI functions","sidebarTitle":"AI","href":"/analyze-explore/calculations/ai"},{"title":"Supported date \u0026 time functions","sidebarTitle":"Date \u0026 time","href":"/analyze-explore/calculations/date-time"},{"title":"Supported math and number functions","sidebarTitle":"Math \u0026 number","href":"/analyze-explore/calculations/math-number"},{"title":"Supported position functions","sidebarTitle":"Position","href":"/analyze-explore/calculations/position"},{"title":"Supported logic functions","sidebarTitle":"Logic","href":"/analyze-explore/calculations/logic"},{"title":"Supported text functions","sidebarTitle":"Text","href":"/analyze-explore/calculations/text"}]},{"group":"Custom fields","pages":[{"title":"Creating custom fields in Omni workbooks","sidebarTitle":"Overview","href":"/analyze-explore/custom-fields/index"},{"title":"Binning and grouping custom fields","sidebarTitle":"Bin and group","href":"/analyze-explore/custom-fields/bin-group"},{"title":"Creating filtered measures from query results","sidebarTitle":"Filtered measures","href":"/analyze-explore/custom-fields/filtered-measures"},{"title":"Ranking values with Top N fields","sidebarTitle":"Top N","href":"/analyze-explore/custom-fields/top-n"}]},{"title":"Workbook inspector","sidebarTitle":"Debug \u0026 inspect queries","href":"/analyze-explore/workbook-inspector"},{"group":"Performance optimization","pages":[{"title":"Improving query performance with caching","sidebarTitle":"Caching","href":"/analyze-explore/performance/caching"},{"title":"Optimizing query performance with aggregate awareness","sidebarTitle":"Aggregate awareness","href":"/analyze-explore/performance/aggregate-awareness"}]}]},{"group":"Visualize \u0026 present","icon":"table-columns","pages":[{"title":"Visualize \u0026 present","sidebarTitle":"Overview","href":"/visualize-present/index"},{"group":"Visualizations","root":{"title":"Visualize data in Omni","sidebarTitle":"Overview","href":"/visualize-present/visualizations/index"},"pages":[{"title":"Generating visualizations with AI","sidebarTitle":"Build with AI","href":"/ai/visualizations"},{"group":"Chart types","pages":[{"title":"Overview","href":"/visualize-present/visualizations/types/index"},{"title":"AI summary visualization","sidebarTitle":"AI summary","href":"/visualize-present/visualizations/types/ai-summary"},{"title":"Area charts","href":"/visualize-present/visualizations/types/area"},{"title":"Bar charts","href":"/visualize-present/visualizations/types/bar"},{"title":"Boxplots","href":"/visualize-present/visualizations/types/boxplot"},{"title":"Funnel charts","sidebarTitle":"Funnel","href":"/visualize-present/visualizations/types/funnel"},{"title":"Heatmap Charts","href":"/visualize-present/visualizations/types/heatmap"},{"title":"KPI","href":"/visualize-present/visualizations/types/kpi"},{"title":"Line charts","href":"/visualize-present/visualizations/types/line"},{"title":"Maps","href":"/visualize-present/visualizations/types/map"},{"title":"Markdown visualizations","sidebarTitle":"Markdown","href":"/visualize-present/visualizations/types/markdown"},{"title":"Pie \u0026 Donut charts","href":"/visualize-present/visualizations/types/pie"},{"title":"Sankey charts","sidebarTitle":"Sankey","href":"/visualize-present/visualizations/types/sankey"},{"title":"Scatterplots and bubble charts","sidebarTitle":"Scatterplots","href":"/visualize-present/visualizations/types/scatterplot"},{"group":"Tables","root":{"title":"Table visualizations","sidebarTitle":"Tables","href":"/visualize-present/visualizations/types/table"},"pages":[{"title":"Configuring table field display options","sidebarTitle":"Field display options","href":"/visualize-present/visualizations/types/table-field-display"}]},{"title":"Single record tables","href":"/visualize-present/visualizations/types/single-record"}]},{"group":"Layers","root":{"title":"Build X/Y charts with layers","sidebarTitle":"Layers","href":"/visualize-present/visualizations/layers/index"},"pages":[{"title":"Measure names and Measure values","sidebarTitle":"Measure names and values","href":"/visualize-present/visualizations/layers/measure-names-values"},{"title":"Smart aggregation","sidebarTitle":"Smart aggregation","href":"/visualize-present/visualizations/layers/smart-aggregation"},{"title":"Switch between the layers and classic editors","sidebarTitle":"Switch editors","href":"/visualize-present/visualizations/layers/switch-editors"}]},{"title":"Custom visualizations","href":"/visualize-present/visualizations/types/custom"},{"group":"Configure charts","pages":[{"title":"Color by / Stacking","href":"/visualize-present/visualizations/configuration/color"},{"title":"Series configuration","href":"/visualize-present/visualizations/configuration/series-configuration"},{"title":"Series mapping","href":"/visualize-present/visualizations/configuration/series-mapping"},{"title":"Size by","href":"/visualize-present/visualizations/configuration/size"},{"title":"Tooltips","href":"/visualize-present/visualizations/configuration/tooltips"},{"title":"X-axis configuration","href":"/visualize-present/visualizations/configuration/x-axis"},{"title":"Y-axis (left axis / right axis)","href":"/visualize-present/visualizations/configuration/y-axis"}]},{"group":"Showcase","root":{"title":"Visualization showcase","mode":"wide","href":"/showcase/index"},"pages":[{"title":"Calendar heatmaps","href":"/showcase/visualizations/calendar-heatmaps"},{"title":"Card with criteria checklist","href":"/showcase/visualizations/card-criteria-checklist"},{"title":"Card grid","href":"/showcase/visualizations/card-grid"},{"title":"Card with target candlesticks","href":"/showcase/visualizations/card-target-candlesticks"},{"title":"Card with strip plot","href":"/showcase/visualizations/card-with-strip-plot"},{"title":"Cohort table","href":"/showcase/visualizations/cohort-table"},{"title":"Colored progress bars","href":"/showcase/visualizations/colored-progress-bars"},{"title":"Dashboard tabs","href":"/showcase/visualizations/dashboard-tabs"},{"title":"Dashboard tile anchors (table of contents)","href":"/showcase/visualizations/dashboard-tile-anchors"},{"title":"Data readout","href":"/showcase/visualizations/data-readout"},{"title":"Dumbbell plot","href":"/showcase/visualizations/dumbbell-plot"},{"title":"Gauges","href":"/showcase/visualizations/gauge"},{"title":"Gradient card with metrics","href":"/showcase/visualizations/gradient-card"},{"title":"Honeycomb categorical chart","href":"/showcase/visualizations/honeycomb-categorical"},{"title":"Honeycomb map","href":"/showcase/visualizations/honeycomb-map"},{"title":"Image grid","href":"/showcase/visualizations/image-grid"},{"title":"Invoice report","href":"/showcase/visualizations/invoice-report"},{"title":"Kanban","href":"/showcase/visualizations/kanban"},{"title":"KPI conditional colors","href":"/showcase/visualizations/kpi-conditional-colors"},{"title":"KPI table","href":"/showcase/visualizations/kpi-table"},{"title":"KPI with sparkline","href":"/showcase/visualizations/kpi-with-sparkline"},{"title":"Card list","href":"/showcase/visualizations/list-view"},{"title":"Location with national flag","href":"/showcase/visualizations/location-with-national-flag"},{"title":"Metric tree","href":"/showcase/visualizations/metric-tree"},{"title":"Pie or donut with custom legend","href":"/showcase/visualizations/pie-donut-custom-legend"},{"title":"Pills","href":"/showcase/visualizations/pills"},{"title":"Record lookup","href":"/showcase/visualizations/record-lookup"},{"title":"Repeating pie charts","href":"/showcase/visualizations/repeating-pie-chart"},{"title":"Repeating square fill charts","href":"/showcase/visualizations/repeating-square-fill-chart"},{"title":"Repeating waffle charts","href":"/showcase/visualizations/repeating-waffle-chart"},{"title":"Fancy subtotal table","href":"/showcase/visualizations/simple-subtotal-table"},{"title":"Star rating","href":"/showcase/visualizations/star-rating"},{"title":"Status indicator","href":"/showcase/visualizations/status-indicator"},{"title":"Symmetric funnel","href":"/showcase/visualizations/symmetric-funnel"},{"title":"Table with tiny bar charts","href":"/showcase/visualizations/table-with-tiny-bars"},{"title":"Team progress tracker","href":"/showcase/visualizations/team-progress-tracker"},{"title":"Test result cards","href":"/showcase/visualizations/test-results-cards"},{"title":"Thermometer progress indicator","href":"/showcase/visualizations/thermometer"},{"title":"Uptime heatmaps","href":"/showcase/visualizations/uptime-heatmaps"},{"title":"User profile","href":"/showcase/visualizations/user-profile"},{"title":"Word cloud","href":"/showcase/visualizations/word-cloud"}]}]},{"group":"Dashboards","root":{"title":"Dashboards","sidebarTitle":"Overview","href":"/visualize-present/dashboards/index"},"pages":[{"title":"Create a dashboard","sidebarTitle":"Create","href":"/visualize-present/dashboards/create"},{"group":"Build layouts","pages":[{"title":"Building dashboard layouts with containers and items","sidebarTitle":"Layout containers and items","href":"/visualize-present/dashboards/containers-items"},{"title":"Wireframing with placeholder content","sidebarTitle":"Placeholders","href":"/visualize-present/dashboards/placeholders"},{"title":"Creating multi-page dashboards","sidebarTitle":"Multi-page dashboards","href":"/visualize-present/dashboards/pages"},{"title":"Building page navigation for multi-page dashboards","sidebarTitle":"Page navigation","href":"/visualize-present/dashboards/page-navigation"}]},{"group":"Add content","pages":[{"title":"Working with dashboard charts","sidebarTitle":"Charts","href":"/visualize-present/dashboards/charts"},{"title":"Adding text with Markdown tiles","sidebarTitle":"Text / Markdown","href":"/visualize-present/dashboards/text-markdown"},{"group":"Filters","root":{"title":"Working with dashboard filters","sidebarTitle":"Filters","href":"/visualize-present/dashboards/filters"},"pages":[{"title":"Filter display options","sidebarTitle":"Filter display options","href":"/visualize-present/dashboards/filter-display-options"},{"title":"Filter interactivity","sidebarTitle":"Filter interactivity","href":"/visualize-present/dashboards/filter-interactivity"}]},{"group":"Controls","root":{"title":"Dynamically displaying tile fields with controls","sidebarTitle":"Field controls","href":"/visualize-present/dashboards/controls"},"pages":[{"title":"Dynamic filter controls","sidebarTitle":"Dynamic filter controls","href":"/visualize-present/dashboards/dynamic-filter-controls"}]},{"group":"Dynamic content","pages":[{"title":"Creating dynamic dashboard content with Mustache","sidebarTitle":"Overview","href":"/visualize-present/dynamic-content"},{"title":"Mustache syntax reference","href":"/visualize-present/mustache-reference"},{"title":"Mustache cheatsheet","mode":"wide","href":"/visualize-present/mustache-cheatsheet"}]}]},{"title":"Applying themes to dashboards","sidebarTitle":"Theming","href":"/visualize-present/dashboards/theming"},{"group":"Preview and test","pages":[{"title":"Preview mode","href":"/visualize-present/dashboards/preview-mode"},{"title":"Viewing dashboards as another user","sidebarTitle":"View as user","href":"/visualize-present/dashboards/view-as"}]},{"group":"Manage dashboards","pages":[{"title":"Managing dashboard settings","sidebarTitle":"Settings","href":"/visualize-present/dashboards/settings"},{"title":"Enabling timezone selection on documents","sidebarTitle":"Timezone selection","href":"/visualize-present/dashboards/timezone-override"},{"title":"Analyzing dashboard performance","sidebarTitle":"Dashboard performance profiler","href":"/visualize-present/dashboards/performance-profiler"},{"title":"Downloading dashboards","sidebarTitle":"Download","href":"/visualize-present/dashboards/download"},{"title":"Defining custom dashboard error and empty results messages","sidebarTitle":"Custom error \u0026 empty result messages","href":"/visualize-present/dashboards/custom-state-message"},{"title":"Removing a dashboard from a document","sidebarTitle":"Remove a dashboard","href":"/visualize-present/dashboards/delete"}]}]},{"title":"Chat with Content","sidebarTitle":"Chat with Content","href":"/ai/dashboard-assistant"},{"group":"Apps","root":{"title":"Apps","sidebarTitle":"Apps","href":"/visualize-present/apps/index"},"pages":[{"title":"Styling Apps","sidebarTitle":"Styling","href":"/visualize-present/apps/styling"},{"title":"Inspecting App elements","sidebarTitle":"Element inspector","href":"/visualize-present/apps/inspect"},{"title":"Downloading apps","sidebarTitle":"Download","href":"/visualize-present/apps/download"},{"title":"Importing Claude dashboards as apps","sidebarTitle":"Import from Claude","href":"/visualize-present/apps/claude-dashboards"},{"title":"App settings","sidebarTitle":"Settings","href":"/visualize-present/apps/settings"}]}]},{"group":"Deliver content","icon":"user-group","pages":[{"title":"Sharing content with schedules and alerts","sidebarTitle":"Overview","href":"/share/deliveries/index"},{"title":"Delivering Omni content to Amazon S3","sidebarTitle":"Amazon S3","href":"/share/deliveries/amazon-s3"},{"group":"Email","pages":[{"title":"Delivering Omni content via email","sidebarTitle":"Create email delivery","href":"/share/deliveries/email/index"},{"title":"Personalizing email deliveries with recipient attributes","sidebarTitle":"Personalize deliveries","href":"/share/deliveries/email/personalization"},{"title":"Whitelabeling sender addresses for email deliveries","sidebarTitle":"Whitelabel sender address","href":"/share/deliveries/email/whitelabel"},{"title":"Restricting recipient email domains with allowlist","sidebarTitle":"Domain allowlist","href":"/share/deliveries/email/domain-allowlist"}]},{"title":"Delivering Omni content to Google Sheets","sidebarTitle":"Google Sheets","href":"/share/deliveries/google-sheets"},{"title":"Delivering Omni content to an SFTP server","sidebarTitle":"SFTP","href":"/share/deliveries/sftp"},{"title":"Delivering Omni content to Slack","sidebarTitle":"Slack","href":"/share/deliveries/slack"},{"title":"Webhook deliveries","sidebarTitle":"Webhooks","href":"/share/deliveries/webhooks"},{"title":"Creating dynamic delivery content with Mustache","sidebarTitle":"Dynamic content","href":"/share/deliveries/dynamic-content"},{"title":"Troubleshooting failed deliveries","sidebarTitle":"Troubleshooting","href":"/share/deliveries/troubleshooting"}]},{"group":"Model data","icon":"wrench","pages":[{"group":"Getting started","pages":[{"title":"Modeling in Omni","sidebarTitle":"Overview","href":"/modeling/index"},{"title":"Developing in Omni: Permissions \u0026 content organization","sidebarTitle":"Permissions \u0026 content organization","href":"/modeling/develop/guides/permissions-content-org"},{"title":"Developing in Omni: Modeling in workbooks","sidebarTitle":"Workbook models","href":"/modeling/develop/guides/workbook-modeling"},{"title":"Developing in Omni: Model IDE","sidebarTitle":"Model IDE","href":"/modeling/develop/guides/model-ide"},{"title":"Developing in Omni: Advanced modeling concepts","sidebarTitle":"Advanced concepts","href":"/modeling/develop/guides/advanced-concepts"}]},{"group":"Develop models","root":{"title":"Managing your models","sidebarTitle":"Management","href":"/modeling/develop/model-management"},"pages":[{"title":"Model generation","href":"/modeling/develop/model-generation"},{"title":"Modeling Agent","sidebarTitle":"Modeling Agent","href":"/ai/model-assistant"},{"group":"Optimize for AI","pages":[{"title":"Suggestions","sidebarTitle":"Suggestions","href":"/ai/suggestions"},{"title":"Evals","sidebarTitle":"Evals","href":"/ai/evals"},{"title":"Optimize models for Omni AI","sidebarTitle":"Context management","href":"/modeling/develop/ai-optimization"},{"title":"Learn from conversation","sidebarTitle":"Learn from conversation","href":"/ai/learn-from-conversation"}]},{"title":"Promoting workbook changes to the shared model","sidebarTitle":"Promote changes","href":"/modeling/develop/promotion"},{"title":"Incorporating database changes with schema refreshes","sidebarTitle":"Schema refreshes","href":"/modeling/develop/schema-refreshes"},{"title":"Table migration","sidebarTitle":"Migrate tables","href":"/modeling/develop/table-migration"},{"title":"Validating model changes with the Content Validator","sidebarTitle":"Validate content","href":"/modeling/develop/content-validator"},{"title":"Viewing and restoring model versions in the model IDE","sidebarTitle":"Compare and restore versions","href":"/modeling/develop/history"},{"group":"Shared extensions","root":{"title":"Shared extension models","sidebarTitle":"Shared extensions","href":"/modeling/develop/shared-extensions/index"},"pages":[{"title":"Setting up a shared extension model","sidebarTitle":"Setup","href":"/modeling/develop/shared-extensions/setup"},{"title":"Extension settings","sidebarTitle":"Settings","href":"/modeling/develop/shared-extensions/settings"},{"title":"Branches and Git for extension models","sidebarTitle":"Branches and Git","href":"/modeling/develop/shared-extensions/extension-branches"}]}]},{"group":"Model settings","root":{"title":"Configuring your models","sidebarTitle":"Overview","mode":"wide","href":"/modeling/models/index"},"pages":[{"title":"Controlling data access using the modeling layer","sidebarTitle":"Control data access","href":"/modeling/develop/data-access-control"},{"title":"Formatting values","sidebarTitle":"Format values","href":"/modeling/models/format-values"},{"group":"Model file parameters","expanded":false,"pages":[{"title":"access_grants - Model files","sidebarTitle":"access_grants","href":"/modeling/models/access-grants"},{"title":"ai_chat_topics - Model files","sidebarTitle":"ai_chat_topics","href":"/modeling/models/ai-chat-topics"},{"title":"ai_context - Model files","sidebarTitle":"ai_context","href":"/modeling/models/ai-context"},{"group":"ai_settings","root":{"title":"ai_settings","sidebarTitle":"ai_settings","href":"/modeling/models/parameters/ai-settings/index"},"pages":[{"title":"allow_ctes - AI settings","sidebarTitle":"allow_ctes","href":"/modeling/models/parameters/ai-settings/allow-ctes"},{"title":"allow_custom_fields - AI settings","sidebarTitle":"allow_custom_fields","href":"/modeling/models/parameters/ai-settings/allow-custom-fields"},{"title":"analyze_configuration - AI settings","sidebarTitle":"analyze_configuration","tag":"deprecated","href":"/modeling/models/parameters/ai-settings/analyze-configuration"},{"title":"build_configuration - AI settings","sidebarTitle":"build_configuration","tag":"deprecated","href":"/modeling/models/parameters/ai-settings/build-configuration"},{"title":"conversation_prune_length - AI settings","sidebarTitle":"conversation_prune_length","href":"/modeling/models/parameters/ai-settings/conversation-prune-length"},{"title":"disabled_tools - AI settings","sidebarTitle":"disabled_tools","href":"/modeling/models/parameters/ai-settings/disabled-tools"},{"title":"query_all_views_and_fields - AI settings","sidebarTitle":"query_all_views_and_fields","href":"/modeling/models/parameters/ai-settings/query-all-views-and-fields"},{"title":"show_progress_narration - AI settings","sidebarTitle":"show_progress_narration","href":"/modeling/models/parameters/ai-settings/show-progress-narration"},{"title":"simple_summarize_configuration - AI settings","sidebarTitle":"simple_summarize_configuration","tag":"deprecated","href":"/modeling/models/parameters/ai-settings/simple-summarize-configuration"},{"title":"topic_prune_characters - AI settings","sidebarTitle":"topic_prune_characters","href":"/modeling/models/parameters/ai-settings/topic-prune-characters"},{"title":"validate_analysis - AI settings","sidebarTitle":"validate_analysis","href":"/modeling/models/parameters/ai-settings/validate-analysis"}]},{"title":"auto_run - Model files","sidebarTitle":"auto_run","href":"/modeling/models/auto-run"},{"title":"auto_run_dashboard - Model files","sidebarTitle":"auto_run_dashboard","href":"/modeling/models/auto-run-dashboard"},{"title":"cache_policies - Model files","sidebarTitle":"cache_policies","href":"/modeling/models/cache-policies"},{"title":"calcs_default_pushdown - Model files","sidebarTitle":"calcs_default_pushdown","href":"/modeling/models/calcs-default-pushdown"},{"title":"compute_routing - Model files","sidebarTitle":"compute_routing","href":"/modeling/models/compute-routing"},{"title":"constants - Model files","sidebarTitle":"constants","href":"/modeling/models/constants"},{"title":"custom_calendars - Model files","sidebarTitle":"custom_calendars","href":"/modeling/models/custom-calendars"},{"title":"custom_formats - Model files","sidebarTitle":"custom_formats","href":"/modeling/models/custom-formats"},{"title":"default_cache_policy - Model files","sidebarTitle":"default_cache_policy","href":"/modeling/models/default-cache-policy"},{"title":"default_custom_calendar - Model files","sidebarTitle":"default_custom_calendar","href":"/modeling/models/default-custom-calendar"},{"title":"default_group_by - Model files","sidebarTitle":"default_group_by","href":"/modeling/models/default-group-by"},{"title":"default_numeric_locale - Model files","sidebarTitle":"default_numeric_locale","href":"/modeling/models/default-numeric-locale"},{"title":"default_row_limit - Model files","sidebarTitle":"default_row_limit","href":"/modeling/models/default-row-limit"},{"title":"default_timeframes - Model files","sidebarTitle":"default_timeframes","href":"/modeling/models/default-timeframes"},{"title":"default_topic_access_filters - Model files","sidebarTitle":"default_topic_access_filters","href":"/modeling/models/default-topic-access-filters"},{"title":"default_topic_hidden_unless_access_grants - Model files","sidebarTitle":"default_topic_hidden_unless_access_grants","href":"/modeling/models/default-topic-hidden-unless-access-grants"},{"title":"default_topic_required_access_grants - Model files","sidebarTitle":"default_topic_required_access_grants","href":"/modeling/models/default-topic-required-access-grants"},{"title":"dynamic_schemas - Model files","sidebarTitle":"dynamic_schemas","href":"/modeling/models/dynamic-schemas"},{"title":"dynamic_shared_extensions - Model files","sidebarTitle":"dynamic_shared_extensions","href":"/modeling/models/dynamic-shared-extensions"},{"title":"extends - Model files","sidebarTitle":"extends","mode":"wide","href":"/modeling/models/extends"},{"title":"facet_workbook_filters - Model files","sidebarTitle":"facet_workbook_filters","href":"/modeling/models/facet-workbook-filters"},{"title":"fiscal_month_offset - Model files","sidebarTitle":"fiscal_month_offset","href":"/modeling/models/fiscal-month-offset"},{"title":"ignored_schemas - Model files","sidebarTitle":"ignored_schemas","href":"/modeling/models/ignored-schemas"},{"title":"ignored_views - Model files","sidebarTitle":"ignored_views","href":"/modeling/models/ignored-views"},{"title":"included_schemas - Model files","sidebarTitle":"included_schemas","mode":"wide","href":"/modeling/models/included-schemas"},{"title":"included_views - Model files","sidebarTitle":"included_views","mode":"wide","href":"/modeling/models/included-views"},{"title":"sample_queries - Model files","sidebarTitle":"sample_queries","href":"/modeling/models/sample-queries"},{"title":"sets - Model files","sidebarTitle":"sets","href":"/modeling/models/sets"},{"title":"skills - Model files","sidebarTitle":"skills","href":"/modeling/models/skills"},{"title":"slot_reservation - Model files","sidebarTitle":"slot_reservation","href":"/modeling/models/slot-reservation"},{"title":"sql_preamble - Model files","sidebarTitle":"sql_preamble","href":"/modeling/models/sql-preamble"},{"title":"template - Model files","sidebarTitle":"template","href":"/modeling/models/template"},{"title":"topic_group_descriptions - Model files","sidebarTitle":"topic_group_descriptions","href":"/modeling/models/topic-group-descriptions"},{"title":"topics - Model files","sidebarTitle":"topics","href":"/modeling/models/topics"},{"title":"warehouse_override - Model files","sidebarTitle":"warehouse_override","href":"/modeling/models/warehouse-override"},{"title":"week_start_day - Model files","sidebarTitle":"week_start_day","href":"/modeling/models/week-start-day"}]}]},{"group":"Topics","root":{"title":"Curating datasets with topics","sidebarTitle":"Overview","href":"/modeling/topics/index"},"pages":[{"title":"Creating topics","sidebarTitle":"Create topics","href":"/modeling/topics/setup"},{"title":"Creating topics with AI quickstart","sidebarTitle":"Create topics with AI","href":"/modeling/topics/quickstart"},{"title":"Topic best practices","sidebarTitle":"Best practices","href":"/modeling/topics/best-practices"},{"title":"Topic design inspiration","sidebarTitle":"Examples","href":"/modeling/topics/examples"},{"group":"Parameters","pages":[{"title":"Topic file parameters","sidebarTitle":"All parameters","href":"/modeling/topics/parameters/index"},{"title":"access_filters - Topics","sidebarTitle":"access_filters","href":"/modeling/topics/parameters/access-filters"},{"title":"ai_context - Topics","sidebarTitle":"ai_context","href":"/modeling/topics/parameters/ai-context"},{"title":"ai_fields - Topics","sidebarTitle":"ai_fields","href":"/modeling/topics/parameters/ai-fields"},{"title":"ai_prune_characters - Topics","sidebarTitle":"ai_prune_characters","href":"/modeling/topics/parameters/ai-prune-characters"},{"title":"always_having_filters - Topics","sidebarTitle":"always_having_filters","href":"/modeling/topics/parameters/always-having-filters"},{"title":"always_having_sql - Topics","sidebarTitle":"always_having_sql","href":"/modeling/topics/parameters/always-having-sql"},{"title":"always_where_filters - Topics","sidebarTitle":"always_where_filters","href":"/modeling/topics/parameters/always-where-filters"},{"title":"always_where_sql - Topics","sidebarTitle":"always_where_sql","href":"/modeling/topics/parameters/always-where-sql"},{"title":"auto_run - Topics","sidebarTitle":"auto_run","href":"/modeling/topics/parameters/auto-run"},{"title":"base_view - Topics","sidebarTitle":"base_view","href":"/modeling/topics/parameters/base-view"},{"title":"base_view_label - Topics","sidebarTitle":"base_view_label","href":"/modeling/topics/parameters/base-view-label"},{"title":"cache_policy - Topics","sidebarTitle":"cache_policy","href":"/modeling/topics/parameters/cache-policy"},{"title":"default_filters - Topics","sidebarTitle":"default_filters","href":"/modeling/topics/parameters/default-filters"},{"title":"default_row_limit - Topics","sidebarTitle":"default_row_limit","href":"/modeling/topics/parameters/default-row-limit"},{"title":"description - Topics","sidebarTitle":"description","href":"/modeling/topics/parameters/description"},{"title":"display_order - Topics","sidebarTitle":"display_order","href":"/modeling/topics/parameters/display-order"},{"title":"extends - Topics","sidebarTitle":"extends","href":"/modeling/topics/parameters/extends"},{"title":"fields - Topics","sidebarTitle":"fields","href":"/modeling/topics/parameters/fields"},{"title":"group_label - Topics","sidebarTitle":"group_label","href":"/modeling/topics/parameters/group-label"},{"title":"hidden - Topics","sidebarTitle":"hidden","href":"/modeling/topics/parameters/hidden"},{"title":"hidden_unless_access_grants - Topics","sidebarTitle":"hidden_unless_access_grants","href":"/modeling/topics/parameters/hidden-unless-access-grants"},{"title":"joins - Topics","sidebarTitle":"joins","href":"/modeling/topics/parameters/joins"},{"title":"label - Topics","sidebarTitle":"label","href":"/modeling/topics/parameters/label"},{"title":"owners - Topics","sidebarTitle":"owners","href":"/modeling/topics/parameters/owners"},{"title":"relationships - Topics","sidebarTitle":"relationships","href":"/modeling/topics/parameters/relationships"},{"title":"required_access_grants - Topics","sidebarTitle":"required_access_grants","href":"/modeling/topics/parameters/required-access-grants"},{"title":"sample_queries - Topics","sidebarTitle":"sample_queries","href":"/modeling/topics/parameters/sample-queries"},{"title":"skills - Topics","sidebarTitle":"skills","href":"/modeling/topics/parameters/skills"},{"title":"tags - Topics","sidebarTitle":"tags","href":"/modeling/topics/parameters/tags"},{"title":"template - Topics","sidebarTitle":"template","href":"/modeling/topics/parameters/template"},{"title":"views - Topics","sidebarTitle":"views","href":"/modeling/topics/parameters/views"},{"title":"warehouse_override - Topics","sidebarTitle":"warehouse_override","href":"/modeling/topics/parameters/warehouse-override"},{"title":"week_start_day - Topics","sidebarTitle":"week_start_day","href":"/modeling/topics/parameters/week-start-day"}]}]},{"group":"Composite topics","root":{"title":"Composite topics","sidebarTitle":"Overview","href":"/modeling/composite-topics/index"},"pages":[{"title":"Create a composite topic","sidebarTitle":"Create composite topics","href":"/modeling/composite-topics/create"},{"title":"Composite topic examples","sidebarTitle":"Examples","href":"/modeling/composite-topics/examples"},{"group":"Parameters","root":{"title":"Composite topic parameters","sidebarTitle":"All parameters","href":"/modeling/composite-topics/parameters/index"},"pages":[{"title":"ai_context - Composite topics","sidebarTitle":"ai_context","href":"/modeling/composite-topics/parameters/ai-context"},{"title":"always_join_all_topics - Composite topics","sidebarTitle":"always_join_all_topics","href":"/modeling/composite-topics/parameters/always-join-all-topics"},{"title":"cache_policy - Composite topics","sidebarTitle":"cache_policy","href":"/modeling/composite-topics/parameters/cache-policy"},{"title":"default_filters - Composite topics","sidebarTitle":"default_filters","href":"/modeling/composite-topics/parameters/default-filters"},{"title":"description - Composite topics","sidebarTitle":"description","href":"/modeling/composite-topics/parameters/description"},{"title":"display_order - Composite topics","sidebarTitle":"display_order","href":"/modeling/composite-topics/parameters/display-order"},{"title":"fields - Composite topics","sidebarTitle":"fields","href":"/modeling/composite-topics/parameters/fields"},{"title":"hidden - Composite topics","sidebarTitle":"hidden","href":"/modeling/composite-topics/parameters/hidden"},{"title":"hidden_unless_access_grants - Composite topics","sidebarTitle":"hidden_unless_access_grants","href":"/modeling/composite-topics/parameters/hidden-unless-access-grants"},{"title":"label - Composite topics","sidebarTitle":"label","href":"/modeling/composite-topics/parameters/label"},{"title":"required_access_grants - Composite topics","sidebarTitle":"required_access_grants","href":"/modeling/composite-topics/parameters/required-access-grants"},{"title":"sample_queries - Composite topics","sidebarTitle":"sample_queries","href":"/modeling/composite-topics/parameters/sample-queries"},{"title":"shared_dimensions - Composite topics","sidebarTitle":"shared_dimensions","href":"/modeling/composite-topics/parameters/shared-dimensions"},{"title":"shared_measures - Composite topics","sidebarTitle":"shared_measures","href":"/modeling/composite-topics/parameters/shared-measures"},{"title":"shared_views - Composite topics","sidebarTitle":"shared_views","href":"/modeling/composite-topics/parameters/shared-views"},{"title":"tags - Composite topics","sidebarTitle":"tags","href":"/modeling/composite-topics/parameters/tags"},{"title":"topics - Composite topics","sidebarTitle":"topics","href":"/modeling/composite-topics/parameters/topics"},{"title":"unrelated_dimension_handling - Composite topics","sidebarTitle":"unrelated_dimension_handling","href":"/modeling/composite-topics/parameters/unrelated-dimension-handling"}]}]},{"group":"Views","root":{"title":"Working with views","sidebarTitle":"Overview","href":"/modeling/views/index"},"pages":[{"title":"Editing database views","sidebarTitle":"Edit views","href":"/modeling/views/edit"},{"title":"Aliasing views","sidebarTitle":"Aliasing","href":"/modeling/views/alias"},{"group":"Parameters","root":{"title":"All View file parameters","sidebarTitle":"All parameters","mode":"wide","href":"/modeling/views/parameters/index"},"pages":[{"title":"ai_context - Views","sidebarTitle":"ai_context","href":"/modeling/views/parameters/ai-context"},{"title":"aliases - Views","sidebarTitle":"aliases","href":"/modeling/views/parameters/aliases"},{"title":"catalog - Views","sidebarTitle":"catalog","href":"/modeling/views/parameters/catalog"},{"title":"custom_compound_primary_key_sql - Views","sidebarTitle":"custom_compound_primary_key_sql","href":"/modeling/views/parameters/custom-compound-primary-key-sql"},{"title":"default_drill_fields - Views","sidebarTitle":"default_drill_fields","href":"/modeling/views/parameters/default-drill-fields"},{"title":"default_drill_query - Views","sidebarTitle":"default_drill_query","href":"/modeling/views/parameters/default-drill-query"},{"title":"description - Views","sidebarTitle":"description","href":"/modeling/views/parameters/description"},{"title":"display_order - Views","sidebarTitle":"display_order","href":"/modeling/views/parameters/display-order"},{"title":"extends - Views","sidebarTitle":"extends","href":"/modeling/views/parameters/extends"},{"title":"fill_fields - Views","sidebarTitle":"fill_fields","href":"/modeling/views/parameters/fill-fields"},{"title":"folder - Views","sidebarTitle":"folder","href":"/modeling/views/parameters/folder"},{"title":"hidden - Views","sidebarTitle":"hidden","href":"/modeling/views/parameters/hidden"},{"title":"ignored - Views","sidebarTitle":"ignored","href":"/modeling/views/parameters/ignored"},{"title":"ignored_props - Views","sidebarTitle":"ignored_props","href":"/modeling/views/parameters/ignored-props"},{"title":"label - Views","sidebarTitle":"label","href":"/modeling/views/parameters/label"},{"title":"materialized_query - Views","sidebarTitle":"materialized_query","href":"/modeling/views/parameters/materialized-query"},{"title":"name - Views","sidebarTitle":"name","href":"/modeling/views/parameters/name"},{"title":"query - Views","sidebarTitle":"query","href":"/modeling/views/parameters/query"},{"title":"required_access_grants - Views","sidebarTitle":"required_access_grants","href":"/modeling/views/parameters/required-access-grants"},{"title":"schema - Views","sidebarTitle":"schema","href":"/modeling/views/parameters/schema"},{"title":"schema_label - Views","sidebarTitle":"schema_label","href":"/modeling/views/parameters/schema-label"},{"title":"sql - Views","sidebarTitle":"sql","href":"/modeling/views/parameters/sql"},{"title":"table_name - Views","sidebarTitle":"table_name","href":"/modeling/views/parameters/table-name"},{"title":"tags - Views","sidebarTitle":"tags","href":"/modeling/views/parameters/tags"},{"title":"template - Views","sidebarTitle":"template","href":"/modeling/views/parameters/template"},{"title":"uploaded_table_name - Views","sidebarTitle":"uploaded_table_name","href":"/modeling/views/parameters/uploaded-table-name"}]}]},{"group":"Query views","root":{"title":"Configuring query views","sidebarTitle":"Overview","href":"/modeling/query-views/index"},"pages":[{"title":"Editing query views","sidebarTitle":"Edit query views","href":"/modeling/query-views/edit"},{"group":"Parameters","root":{"title":"Query view parameters","sidebarTitle":"All parameters","href":"/modeling/query-views/parameters/index"},"pages":[{"title":"ai_context - Query views","sidebarTitle":"ai_context","href":"/modeling/query-views/parameters/ai-context"},{"title":"base_view - Query views","sidebarTitle":"base_view","href":"/modeling/query-views/parameters/base-view"},{"title":"description - Query views","sidebarTitle":"description","href":"/modeling/query-views/parameters/description"},{"title":"display_order - Query views","sidebarTitle":"display_order","href":"/modeling/query-views/parameters/display-order"},{"title":"dimensions - Query views","sidebarTitle":"dimensions","href":"/modeling/query-views/parameters/dimensions"},{"title":"hidden - Query views","sidebarTitle":"hidden","href":"/modeling/query-views/parameters/hidden"},{"title":"ignored - Query views","sidebarTitle":"ignored","href":"/modeling/query-views/parameters/ignored"},{"title":"label - Query views","sidebarTitle":"label","href":"/modeling/query-views/parameters/label"},{"title":"measures - Query views","sidebarTitle":"measures","href":"/modeling/query-views/parameters/measures"},{"group":"query","root":{"title":"query - Query views","sidebarTitle":"query","href":"/modeling/query-views/parameters/query"},"pages":[{"title":"bind - Query views","sidebarTitle":"bind","href":"/modeling/query-views/parameters/bind"},{"title":"bind_all_filters - Query views","sidebarTitle":"bind_all_filters","href":"/modeling/query-views/parameters/bind-all-filters"},{"title":"bind_outer_context - Query views","sidebarTitle":"bind_outer_context","href":"/modeling/query-views/parameters/bind-outer-context"},{"title":"calculations - Query views","sidebarTitle":"calculations","href":"/modeling/query-views/parameters/calculations"},{"title":"default_group_by - Query views","sidebarTitle":"default_group_by","href":"/modeling/query-views/parameters/default-group-by"},{"title":"fields - Query views","sidebarTitle":"fields","href":"/modeling/query-views/parameters/fields"},{"title":"fill_fields - Query views","sidebarTitle":"fill_fields","href":"/modeling/query-views/parameters/fill-fields"},{"title":"filters - Query views","sidebarTitle":"filters","href":"/modeling/query-views/parameters/filters"},{"title":"join_via_map - Query views","sidebarTitle":"join_via_map","href":"/modeling/query-views/parameters/join-via-map"},{"title":"limit - Query views","sidebarTitle":"limit","href":"/modeling/query-views/parameters/limit"},{"title":"sorts - Query views","sidebarTitle":"sorts","href":"/modeling/query-views/parameters/sorts"},{"title":"topic - Query views","sidebarTitle":"topic","href":"/modeling/query-views/parameters/topic"}]},{"title":"schema - Query views","sidebarTitle":"schema","href":"/modeling/query-views/parameters/schema"},{"title":"sql - Query views","sidebarTitle":"sql","href":"/modeling/query-views/parameters/sql"},{"title":"tags - Query views","sidebarTitle":"tags","href":"/modeling/query-views/parameters/tags"}]}]},{"group":"Measures","root":{"title":"Measures","sidebarTitle":"Overview","href":"/modeling/measures/index"},"pages":[{"group":"Parameters","root":{"title":"Measure parameters","sidebarTitle":"All parameters","href":"/modeling/measures/parameters/index"},"pages":[{"title":"aggregate_type - Measures","sidebarTitle":"aggregate_type","href":"/modeling/measures/parameters/aggregate-type"},{"title":"ai_context - Measures","sidebarTitle":"ai_context","href":"/modeling/measures/parameters/ai-context"},{"title":"aliases - Measures","sidebarTitle":"aliases","href":"/modeling/measures/parameters/aliases"},{"title":"all_values - Measures","sidebarTitle":"all_values","href":"/modeling/measures/parameters/all-values"},{"title":"colors - Measures","sidebarTitle":"colors","href":"/modeling/measures/parameters/colors"},{"title":"custom_primary_key_sql - Measures","sidebarTitle":"custom_primary_key_sql","href":"/modeling/measures/parameters/custom-primary-key-sql"},{"title":"description - Measures","sidebarTitle":"description","href":"/modeling/measures/parameters/description"},{"title":"display_order - Measures","sidebarTitle":"display_order","href":"/modeling/measures/parameters/display-order"},{"title":"drill_fields - Measures","sidebarTitle":"drill_fields","href":"/modeling/measures/parameters/drill-fields"},{"title":"drill_queries - Measures","sidebarTitle":"drill_queries","href":"/modeling/measures/parameters/drill-queries"},{"title":"filters - Measures","sidebarTitle":"filters","href":"/modeling/measures/parameters/filters"},{"title":"format - Measures","sidebarTitle":"format","href":"/modeling/measures/parameters/format"},{"title":"group_label - Measures","sidebarTitle":"group_label","href":"/modeling/measures/parameters/group-label"},{"title":"hidden - Measures","sidebarTitle":"hidden","href":"/modeling/measures/parameters/hidden"},{"title":"ignored - Measures","sidebarTitle":"ignored","href":"/modeling/measures/parameters/ignored"},{"title":"ignored_props - Measures","sidebarTitle":"ignored_props","href":"/modeling/measures/parameters/ignored-props"},{"title":"label - Measures","sidebarTitle":"label","href":"/modeling/measures/parameters/label"},{"title":"level_of_detail - Measures","sidebarTitle":"level_of_detail","href":"/modeling/measures/parameters/level-of-detail"},{"title":"links - Measures","sidebarTitle":"links","href":"/modeling/measures/parameters/links"},{"title":"markdown - Measures","sidebarTitle":"markdown","href":"/modeling/measures/parameters/markdown"},{"title":"null_display - Measures","sidebarTitle":"null_display","href":"/modeling/measures/parameters/null-display"},{"title":"required_access_grants - Measures","sidebarTitle":"required_access_grants","href":"/modeling/measures/parameters/required-access-grants"},{"title":"required_fields - Measures","sidebarTitle":"required_fields","href":"/modeling/measures/parameters/required-fields"},{"title":"sample_values - Measures","sidebarTitle":"sample_values","href":"/modeling/measures/parameters/sample-values"},{"title":"sql - Measures","sidebarTitle":"sql","href":"/modeling/measures/parameters/sql"},{"title":"suggest_from_field - Measures","sidebarTitle":"suggest_from_field","href":"/modeling/measures/parameters/suggest-from-field"},{"title":"suggestion_list - Measures","sidebarTitle":"suggestion_list","href":"/modeling/measures/parameters/suggestion-list"},{"title":"synonyms - Measures","sidebarTitle":"synonyms","href":"/modeling/measures/parameters/synonyms"},{"title":"tags - Measures","sidebarTitle":"tags","href":"/modeling/measures/parameters/tags"},{"title":"view_label - Measures","sidebarTitle":"view_label","description":"Move a measure under a different view in the field browser for better organization, such as grouping aggregates with their source.","href":"/modeling/measures/parameters/view-label"},{"title":"window - Measures","sidebarTitle":"window","href":"/modeling/measures/parameters/window"}]}]},{"group":"Dimensions","root":{"title":"Dimensions","sidebarTitle":"Overview","description":"A dimension is an attribute that describes a row of data.","href":"/modeling/dimensions/index"},"pages":[{"group":"Parameters","root":{"title":"All dimension parameters","sidebarTitle":"All parameters","href":"/modeling/dimensions/parameters/index"},"pages":[{"title":"ai_context - Dimensions","sidebarTitle":"ai_context","href":"/modeling/dimensions/parameters/ai-context"},{"title":"aliases - Dimensions","sidebarTitle":"aliases","href":"/modeling/dimensions/parameters/aliases"},{"title":"all_values - Dimensions","sidebarTitle":"all_values","href":"/modeling/dimensions/parameters/all-values"},{"title":"bin_boundaries - Dimensions","sidebarTitle":"bin_boundaries","href":"/modeling/dimensions/parameters/bin-boundaries"},{"title":"colors - Dimensions","sidebarTitle":"colors","href":"/modeling/dimensions/parameters/colors"},{"title":"convert_tz - Dimensions","sidebarTitle":"convert_tz","href":"/modeling/dimensions/parameters/convert-tz"},{"title":"custom_calendar - Dimensions","sidebarTitle":"custom_calendar","href":"/modeling/dimensions/parameters/custom-calendar"},{"title":"custom_primary_key_sql_for_quick_aggs - Dimensions","sidebarTitle":"custom_primary_key_sql_for_quick_aggs","href":"/modeling/dimensions/parameters/custom-primary-key-sql-for-quick-aggs"},{"title":"description - Dimensions","sidebarTitle":"description","href":"/modeling/dimensions/parameters/description"},{"title":"display_order - Dimensions","sidebarTitle":"display_order","href":"/modeling/dimensions/parameters/display-order"},{"title":"duration - Dimensions","sidebarTitle":"duration","href":"/modeling/dimensions/parameters/duration"},{"title":"dynamic_top_n - Dimensions","sidebarTitle":"dynamic_top_n","href":"/modeling/dimensions/parameters/dynamic-top-n"},{"title":"drill_fields - Dimensions","sidebarTitle":"drill_fields","href":"/modeling/dimensions/parameters/drill-fields"},{"title":"extends - Dimensions","sidebarTitle":"extends","href":"/modeling/dimensions/parameters/extends"},{"title":"faceting - Dimensions","sidebarTitle":"faceting","href":"/modeling/dimensions/parameters/faceting"},{"title":"filter_single_select_only - Dimensions","sidebarTitle":"filter_single_select_only","href":"/modeling/dimensions/parameters/filter-single-select-only"},{"title":"format - Dimensions","sidebarTitle":"format","href":"/modeling/dimensions/parameters/format"},{"title":"group_label - Dimensions","sidebarTitle":"group_label","href":"/modeling/dimensions/parameters/group-label"},{"title":"groups - Dimensions","sidebarTitle":"groups","href":"/modeling/dimensions/parameters/groups"},{"title":"hidden - Dimensions","sidebarTitle":"hidden","href":"/modeling/dimensions/parameters/hidden"},{"title":"ignore_from_extended - Dimensions","sidebarTitle":"ignore_from_extended","href":"/modeling/dimensions/parameters/ignore-from-extended"},{"title":"ignored - Dimensions","sidebarTitle":"ignored","href":"/modeling/dimensions/parameters/ignored"},{"title":"ignored_props - Dimensions","sidebarTitle":"ignored_props","href":"/modeling/dimensions/parameters/ignored-props"},{"title":"label - Dimensions","sidebarTitle":"label","href":"/modeling/dimensions/parameters/label"},{"title":"level_of_detail - Dimensions","sidebarTitle":"level_of_detail","href":"/modeling/dimensions/parameters/level-of-detail"},{"title":"links - Dimensions","sidebarTitle":"links","href":"/modeling/dimensions/parameters/links"},{"title":"markdown - Dimensions","sidebarTitle":"markdown","href":"/modeling/dimensions/parameters/markdown"},{"title":"mask_unless_access_grants - Dimensions","sidebarTitle":"mask_unless_access_grants","href":"/modeling/dimensions/parameters/mask-unless-access-grants"},{"title":"null_display - Dimensions","sidebarTitle":"null_display","href":"/modeling/dimensions/parameters/null-display"},{"title":"order_by_field - Dimensions","sidebarTitle":"order_by_field","href":"/modeling/dimensions/parameters/order-by-field"},{"title":"parent_field - Dimensions","sidebarTitle":"parent_field","href":"/modeling/dimensions/parameters/parent-field"},{"title":"primary_key - Dimensions","sidebarTitle":"primary_key","href":"/modeling/dimensions/parameters/primary-key"},{"title":"required_access_grants - Dimensions","sidebarTitle":"required_access_grants","href":"/modeling/dimensions/parameters/required-access-grants"},{"title":"sample_values - Dimensions","sidebarTitle":"sample_values","href":"/modeling/dimensions/parameters/sample-values"},{"title":"skip_parent_label - Dimensions","sidebarTitle":"skip_parent_label","href":"/modeling/dimensions/parameters/skip-parent-label"},{"title":"sql - Dimensions","sidebarTitle":"sql","href":"/modeling/dimensions/parameters/sql"},{"title":"suggest_from_field - Dimensions","sidebarTitle":"suggest_from_field","href":"/modeling/dimensions/parameters/suggest-from-field"},{"title":"suggest_from_topic - Dimensions","sidebarTitle":"suggest_from_topic","href":"/modeling/dimensions/parameters/suggest-from-topic"},{"title":"suggestion_list - Dimensions","sidebarTitle":"suggestion_list","href":"/modeling/dimensions/parameters/suggestion-list"},{"title":"synonyms - Dimensions","sidebarTitle":"synonyms","href":"/modeling/dimensions/parameters/synonyms"},{"title":"tags - Dimensions","sidebarTitle":"tags","href":"/modeling/dimensions/parameters/tags"},{"title":"timeframes - Dimensions","sidebarTitle":"timeframes","href":"/modeling/dimensions/parameters/timeframes"},{"title":"view_label - Dimensions","sidebarTitle":"view_label","href":"/modeling/dimensions/parameters/view-label"},{"title":"week_start_day - Dimensions","sidebarTitle":"week_start_day","href":"/modeling/dimensions/parameters/week-start-day"}]}]},{"group":"Joins","root":{"title":"Relationships and joins","sidebarTitle":"Overview","href":"/modeling/relationships/index"},"pages":[{"title":"Creating table joins","sidebarTitle":"Build table joins","href":"/modeling/relationships/build"},{"group":"Parameters","root":{"title":"Relationship file parameters","sidebarTitle":"All parameters","href":"/modeling/relationships/parameters/index"},"pages":[{"title":"id - Relationships","sidebarTitle":"id","href":"/modeling/relationships/parameters/id"},{"title":"join_from_view - Relationships","sidebarTitle":"join_from_view","href":"/modeling/relationships/parameters/join-from-view"},{"title":"join_from_view_as - Relationships","sidebarTitle":"join_from_view_as","href":"/modeling/relationships/parameters/join-from-view-as"},{"title":"join_from_view_as_label - Relationships","sidebarTitle":"join_from_view_as_label","href":"/modeling/relationships/parameters/join-from-view-as-label"},{"title":"join_to_view - Relationships","sidebarTitle":"join_to_view","href":"/modeling/relationships/parameters/join-to-view"},{"title":"join_to_view_as - Relationships","sidebarTitle":"join_to_view_as","href":"/modeling/relationships/parameters/join-to-view-as"},{"title":"join_to_view_as_label - Relationships","sidebarTitle":"join_to_view_as_label","href":"/modeling/relationships/parameters/join-to-view-as-label"},{"title":"join_type - Relationships","sidebarTitle":"join_type","href":"/modeling/relationships/parameters/join-type"},{"title":"on_sql - Relationships","sidebarTitle":"on_sql","href":"/modeling/relationships/parameters/on-sql"},{"title":"relationship_type - Relationships","sidebarTitle":"relationship_type","href":"/modeling/relationships/parameters/relationship-type"},{"title":"reversible - Relationships","sidebarTitle":"reversible","href":"/modeling/relationships/parameters/reversible"},{"title":"where_sql - Relationships","sidebarTitle":"where_sql","href":"/modeling/relationships/parameters/where-sql"}]}]},{"group":"Filters","root":{"title":"Filter syntax","sidebarTitle":"Syntax","href":"/modeling/filters/index"},"pages":[{"title":"Filter examples","sidebarTitle":"Examples","href":"/modeling/filters/examples"},{"group":"Operators","root":{"title":"Filter operators","sidebarTitle":"All operators","href":"/modeling/filters/operators/index"},"pages":[{"group":"Conditional","pages":[{"title":"and - Filter operators","sidebarTitle":"and","href":"/modeling/filters/operators/and"},{"title":"is - Filter operators","sidebarTitle":"is","href":"/modeling/filters/operators/is"},{"title":"not - Filter operators","sidebarTitle":"not","href":"/modeling/filters/operators/not"},{"title":"or - Filter operators","sidebarTitle":"or","href":"/modeling/filters/operators/or"}]},{"group":"Advanced","pages":[{"title":"cancel_query_filter - Filter operators","sidebarTitle":"cancel_query_filter","href":"/modeling/filters/operators/cancel-query-filter"},{"title":"exclude_from_bind_all - Filter operators","sidebarTitle":"exclude_from_bind_all","href":"/modeling/filters/operators/exclude-from-bind-all"},{"title":"exclude_from_level_of_detail - Filter operators","sidebarTitle":"exclude_from_level_of_detail","href":"/modeling/filters/operators/exclude-from-level-of-detail"},{"title":"field_name_in_query - Filter operators","sidebarTitle":"field_name_in_query","href":"/modeling/filters/operators/field-name-in-query"},{"title":"field_name_not_in_query - Filter operators","sidebarTitle":"field_name_not_in_query","href":"/modeling/filters/operators/field-name-not-in-query"},{"title":"required - Filter operators","sidebarTitle":"required","href":"/modeling/filters/operators/required"}]},{"group":"Date \u0026 time","pages":[{"title":"before - Filter operators","sidebarTitle":"before","href":"/modeling/filters/operators/before"},{"title":"between_dates - Filter operators","sidebarTitle":"between_dates","href":"/modeling/filters/operators/between-dates"},{"title":"date_offset_from_query - Filter operators","sidebarTitle":"date_offset_from_query","href":"/modeling/filters/operators/date-offset-from-query"},{"title":"day_of_month - Filter operators","sidebarTitle":"day_of_month","href":"/modeling/filters/operators/day-of-month"},{"title":"day_of_quarter - Filter operators","sidebarTitle":"day_of_quarter","href":"/modeling/filters/operators/day-of-quarter"},{"title":"day_of_week - Filter operators","sidebarTitle":"day_of_week","href":"/modeling/filters/operators/day-of-week"},{"title":"day_of_year - Filter operators","sidebarTitle":"day_of_year","href":"/modeling/filters/operators/day-of-year"},{"title":"hour_of_day - Filter operators","sidebarTitle":"hour_of_day","href":"/modeling/filters/operators/hour-of-day"},{"title":"month_of_year - Filter operators","sidebarTitle":"month_of_year","href":"/modeling/filters/operators/month-of-year"},{"title":"on_or_after - Filter operators","sidebarTitle":"on_or_after","href":"/modeling/filters/operators/on-or-after"},{"title":"quarter_of_year - Filter operators","sidebarTitle":"quarter_of_year","href":"/modeling/filters/operators/quarter-of-year"},{"title":"time_for_duration - Filter operators","sidebarTitle":"time_for_duration","href":"/modeling/filters/operators/time-for-duration"}]},{"group":"Number","pages":[{"title":"between - Filter operators","sidebarTitle":"between","href":"/modeling/filters/operators/between"},{"title":"greater_than - Filter operators","sidebarTitle":"greater_than","href":"/modeling/filters/operators/greater-than"},{"title":"greater_than_or_equal_to - Filter operators","sidebarTitle":"greater_than_or_equal_to","href":"/modeling/filters/operators/greater-than-or-equal-to"},{"title":"less_than - Filter operators","sidebarTitle":"less_than","href":"/modeling/filters/operators/less-than"},{"title":"less_than_or_equal_to - Filter operators","sidebarTitle":"less_than_or_equal_to","href":"/modeling/filters/operators/less-than-or-equal-to"}]},{"group":"Text","pages":[{"title":"case_insensitive - Filter operators","sidebarTitle":"case_insensitive","href":"/modeling/filters/operators/case-insensitive"},{"title":"contains - Filter operators","sidebarTitle":"contains","href":"/modeling/filters/operators/contains"},{"title":"ends_with - Filter operators","sidebarTitle":"ends_with","href":"/modeling/filters/operators/ends-with"},{"title":"is_empty - Filter operators","sidebarTitle":"is_empty","href":"/modeling/filters/operators/is-empty"},{"title":"starts_with - Filter operators","sidebarTitle":"starts_with","href":"/modeling/filters/operators/starts-with"},{"title":"sql_like - Filter operators","sidebarTitle":"sql_like","href":"/modeling/filters/operators/sql-like"}]}]}]},{"title":"Templated filters","sidebarTitle":"Parameterizing filters","href":"/modeling/templated-filters/index"}]},{"group":"Manage integrations","icon":"engine","pages":[{"group":"dbt","pages":[{"title":"Getting started with dbt","sidebarTitle":"Getting started","href":"/integrations/dbt/index"},{"group":"Connect Git","root":{"title":"Connecting a dbt Git repository to Omni","sidebarTitle":"Overview","href":"/integrations/dbt/setup/index"},"pages":[{"title":"Connecting an Azure DevOps dbt repository to Omni","sidebarTitle":"Azure DevOps","href":"/integrations/dbt/setup/azure-devops"},{"title":"Connecting a GitHub dbt repository to Omni","sidebarTitle":"GitHub","href":"/integrations/dbt/setup/github"},{"title":"Connecting a Gitlab dbt repository to Omni","sidebarTitle":"Gitlab","href":"/integrations/dbt/setup/gitlab"}]},{"title":"Connecting dbt platform","sidebarTitle":"Connect dbt platform","href":"/integrations/dbt/dbt-platform"},{"group":"Sync from dbt","pages":[{"title":"Triggering dbt syncs in Omni","sidebarTitle":"Trigger syncs","href":"/integrations/dbt/syncing-dbt"},{"title":"Integrating dbt's semantic layer with Omni","sidebarTitle":"Integrate dbt's semantic layer","href":"/integrations/dbt/semantic-layer"},{"title":"dbt metadata reference","sidebarTitle":"Metadata reference","href":"/integrations/dbt/metadata-reference"},{"title":"Debugging dbt sync issues","sidebarTitle":"Troubleshooting","href":"/integrations/dbt/debugging-sync-issues"}]},{"group":"Push to dbt","pages":[{"title":"Pushing descriptions to dbt","sidebarTitle":"Push descriptions","href":"/integrations/dbt/push-descriptions"},{"title":"Pushing exposures to dbt","sidebarTitle":"Push exposures","href":"/integrations/dbt/exposures"}]},{"group":"Develop in Omni","pages":[{"title":"Configuring dbt environments in Omni","sidebarTitle":"Configure environments","href":"/integrations/dbt/environments"},{"title":"Swapping dbt environments with virtual schemas","sidebarTitle":"Swap environments","href":"/integrations/dbt/virtual-schemas"},{"title":"Authoring dbt models in Omni","sidebarTitle":"Author models","href":"/integrations/dbt/models"},{"title":"Working with dbt and Git","sidebarTitle":"Work with Git","href":"/integrations/dbt/git-workflows"}]}]},{"group":"git","root":{"title":"Integrate git for model version control","sidebarTitle":"Overview","href":"/integrations/git/index"},"pages":[{"group":"Setup","root":{"title":"Setting up the git integration","sidebarTitle":"Overview","href":"/integrations/git/setup/index"},"pages":[{"title":"Connect an Azure DevOps repository to Omni","sidebarTitle":"Azure DevOps","href":"/integrations/git/setup/azure-devops"},{"title":"Connect a Bitbucket Cloud repository to Omni","sidebarTitle":"Bitbucket Cloud","href":"/integrations/git/setup/bitbucket-cloud"},{"title":"Connect a Bitbucket Data Center/Server repository to Omni","sidebarTitle":"Bitbucket Data Center/Server","href":"/integrations/git/setup/bitbucket-data-center"},{"title":"Connect a GitHub repository to Omni","sidebarTitle":"GitHub","href":"/integrations/git/setup/github"},{"title":"Connect a GitLab repository to Omni","sidebarTitle":"GitLab","href":"/integrations/git/setup/gitlab"}]},{"title":"Git integration best practices","sidebarTitle":"Best practices","href":"/integrations/git/best-practices"},{"group":"Follower mode","root":{"title":"git follower mode","sidebarTitle":"Overview","href":"/integrations/git/follower-mode/index"},"pages":[{"title":"Configuring git follower mode","sidebarTitle":"Configure follower mode","href":"/integrations/git/follower-mode/setup"},{"title":"git follower mode best practices","sidebarTitle":"Follower mode best practices","href":"/integrations/git/follower-mode/best-practices"}]},{"group":"Content in git","root":{"title":"Content in git","sidebarTitle":"Overview","href":"/integrations/git/content/index"},"pages":[{"title":"Syncing content to git","sidebarTitle":"Sync to git","href":"/integrations/git/content/sync-to-git"},{"title":"Repository structure for content in git","sidebarTitle":"Repository structure","href":"/integrations/git/content/repository-structure"},{"title":"Troubleshooting content in git","sidebarTitle":"Troubleshooting","href":"/integrations/git/content/troubleshooting"}]},{"title":"Configuring git integration settings","sidebarTitle":"Settings","href":"/integrations/git/settings"},{"title":"Webhook deliveries","sidebarTitle":"Webhook Deliveries","href":"/integrations/git/webhook-deliveries"},{"title":"Troubleshooting the Git integration","sidebarTitle":"Troubleshooting","href":"/integrations/git/troubleshooting"}]},{"group":"MCP Server","root":{"title":"AI MCP Server","sidebarTitle":"Overview","href":"/ai/mcp/index"},"pages":[{"title":"MCP authentication","sidebarTitle":"Authentication","href":"/ai/mcp/authentication"},{"title":"MCP server tools","sidebarTitle":"Tools","href":"/ai/mcp/tools"},{"group":"Setup","pages":[{"title":"Using the MCP Server in ChatGPT","sidebarTitle":"ChatGPT","href":"/ai/mcp/chatgpt"},{"title":"Using the MCP Server in Claude Code","sidebarTitle":"Claude Code","href":"/ai/mcp/claude-code"},{"title":"Using the MCP Server in Claude Desktop","sidebarTitle":"Claude Desktop","href":"/ai/mcp/claude-desktop"},{"title":"Using the MCP Server in Codex","sidebarTitle":"Codex","href":"/ai/mcp/codex"},{"title":"Using the MCP Server in Cursor","sidebarTitle":"Cursor","href":"/ai/mcp/cursor"},{"title":"Using the MCP Server in Microsoft Copilot","sidebarTitle":"Microsoft Copilot","href":"/ai/mcp/microsoft-copilot"},{"title":"Using the MCP Server in Visual Studio Code","sidebarTitle":"VS Code","href":"/ai/mcp/vscode"}]}]},{"title":"Omni Slack Agent","sidebarTitle":"Omni Slack Agent","href":"/integrations/omni-slack-agent"},{"group":"External AI context","root":{"title":"Connecting AI integrations","sidebarTitle":"Overview","href":"/integrations/ai/index"},"tag":"legacy","pages":[{"group":"Google","pages":[{"title":"Setting up Google AI integrations","sidebarTitle":"Setup","href":"/integrations/ai/google-setup"},{"title":"Google Calendar AI integration","sidebarTitle":"Google Calendar","href":"/integrations/ai/google-calendar"},{"title":"Google Drive AI integration","sidebarTitle":"Google Drive","href":"/integrations/ai/google-drive"}]},{"title":"GitHub AI integration","sidebarTitle":"GitHub","href":"/integrations/ai/github"},{"title":"Notion AI integration","sidebarTitle":"Notion","href":"/integrations/ai/notion"},{"title":"Slack AI integration","sidebarTitle":"Slack","href":"/integrations/ai/slack"}]}]}]},{"tab":"Admin","pages":[{"title":"Admin","href":"/administration"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides"}]},{"tab":"Library","pages":[{"title":"Library","href":"/library"}]},{"tab":"Developers","menu":[{"item":"REST APIs","icon":"cloud","description":"Programmatically interact with Omni","pages":[{"title":"REST APIs","href":"/api"}]},{"item":"Embedding","icon":"chart-column","description":"Embed Omni's analytics \u0026 AI in apps","pages":[{"title":"Embedding","href":"/embed"}]},{"item":"CLI","icon":"terminal","description":"Interact with Omni APIs from the terminal","pages":[{"title":"CLI","href":"/developers/cli"}]},{"item":"Agent skills","icon":"robot","description":"Bring Omni workflows into your agent environment","pages":[{"title":"Agent skills","href":"/developers/agent-skills"}]}],"pages":[{"title":"Developers","href":"/api"}]},{"tab":"Product updates","menu":[{"item":"Demos","icon":"rocket","description":"Weekly updates of upcoming and experimental features","pages":[{"title":"Demos","href":"/demos"}]},{"item":"Changelog","icon":"file-lines","description":"New features, improvements, and bug fixes","pages":[{"title":"Changelog","href":"/changelog"}]}],"pages":[{"title":"Product updates","href":"/demos"}]}]},"basePath":"","title":"window - Measures - Omni Docs","buildId":"dpl_4D8r1dHg6bQcRuBgQyL3z9waJJtn","deploymentId":"dpl_4D8r1dHg6bQcRuBgQyL3z9waJJtn","dynamics":["10e4515597"],"chunks":["BannerMarkdown-BEc0kQWV.js","dist-CU0Gjyt0.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-DzViKcUj.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}