Conditional Filtering lets the semantic layer detect and respond to filters coming from a BI tool or an AI agent,
so that metric logic can adapt dynamically to the user’s query context.So, instead of blindly applying the same transformation or metric calculation every time, the semantic logic can take into
consideration the filters the user provided (like region = Europe, or date >= 2024-01-01).That allows to create default data filtering, and to adjust business logic based on user intent.
GET_FIELD_SELECTION(entity.field, [default value expression])
Parameters:
Single field (entity.field) to detect user filters on
Default value expression in case no user filters on entity.field were provided. If not set, the default value is NULL.
Returns:
The filter value if the BI or AI query filtered entity.filter to a single value, i.e.
For the user filter entity.field = 'value', then would return value
The default value if there was no equality filter.
Only equality filters are detected, as sent by most supported BI tools.
Honeydew uses Conjunctive Normal Form (CNF) decomposition to detect equality filters even when they’re embedded in complex expressions.
For example, given the expression GET_FIELD_SELECTION(entity.field) and a user filter -The following examples would all return value given the filter for it:
entity.field = 'value'
entity.field IN ('value')
entity.field = 'value' AND entity.other_field = 'other_value'
However, multiple values, expressions or compound (OR) filters are not detected.
The following examples would all return NULL (or the default value if set):
entity.field || '' = 'value'
entity.field IN ('value', 'other')
entity.field = 'value' OR entity.other_field = 'value'
entity.field >= 'a'
Using GET_FIELD_SELECTION with Power BIPower BI filtering is case insensitive. To support Power BI, always use same (lower or upper) case values.
To fall back across several fields, wrap separate GET_FIELD_SELECTION calls in COALESCE. With
no default value a call returns NULL, so the leftmost field the user filtered wins:
-- A direct filter on the reference date wins; else a BI selector entity; else todaydim_date.date = COALESCE( GET_FIELD_SELECTION(dim_date.date), GET_FIELD_SELECTION(dim_date_choice.date), CURRENT_DATE)
A GET_FIELD_SELECTION cannot be nested inside another one’s default value expression.
A default value hides the difference between “no filter” and “a filter I could not detect”. Since
only equality filters are detected, a query filtering the field to several values or to a range gets
the default, and the data is reduced as if the user had asked for nothing.Where that matters, give the user a way to widen the filter: a two-value scope selector on a
disconnected entity, with the wide branch returning TRUE, as in
performance filtering.
Detect filters on the same field the expression constrains, as dim_date.date does in the first
tier above.Detecting only a different field leaves a direct filter on the constrained field undetected: the
expression resolves to a later tier and is then combined with the user’s own filter, returning the
intersection of both. See
ensuring filtering for a point in time
for this pattern applied to versioned data.
Use the filter a user has supplied to change how a metric is calculated.This is most commonly used to create different metric is calculations at different grains, over the same data.Examples:Dynamic cohortsGiven a dim_cohort defining user cohorts, simulate based on cohort choice
Per grain logicGiven multiple grains and dim_grain selector entity, choose how a metric is calculated at each grain
(See Metrics with different grains).
daily_data.total_revenue = CASE GET_FIELD_SELECTION(dim_grain.grain) -- with daily grain simple sum up the revenue WHEN `daily` THEN SUM(daily_data.revenue) -- with monthly grain, apply adjustments recorded at end of month WHEN `monthly` THEN SUM(daily_data.revenue) - SUM(monthly_adjustments.revenue_adjustment) END
Simulate data based on user selection
-- Calculate sales based on chosen tax level-- Would return different values for different filters the user choosessales.total_sales_simulated_tax = SUM(sales.sales_pre_tax * GET_FIELD_SELECTION(dim_tax_level.tax_level))
Most business logic does not care about user filters, and is only based on the data.For example when want to calculate differently for 2023 and 2024, then whether the user chose 2023 or 2024
does not matter. How to calculate is a property of the data, not what the user wanted:
-- Calculate sales. Accounts for change in tax between 2023/2024-- Is the same regardless to user filtersales.total_sales = SUM(sales.sales_pre_tax * CASE WHEN sales.sale_year = 2023 THEN 1.17 WHEN sales.sale_year = 2024 THEN 1.18 END )
However, when exactly the same data is differently processed based on user intent then must look at user filters,
as in the total_sales_simulated_tax example above.
Apply a filter on the data by default, unless a user has instructed otherwise.This is used for:
Reduce Cost & Improve Performance with BI: when users build new BI reports, they would typically send unfiltered queries
looking at all the data. They usually don’t want to aggregate all the data, but they may have dragged a metric on a dashboard
first and a date filter only after.Default filtering enables to apply a filter on the data until the user decided to change it. For example, force a “last 2 weeks”
filter on the big fact tables up until the user explicitly asked for more.
Ensure Correctness By Removing Duplicated Data: in some data modeling scenarios, data may have multiple versions recorded.
Aggregating on the data would result in double counting and a wrong result.Default filtering enables to enforce choosing a specific version of the data, always ensuring there is no double counting.
Default filtering is typically implemented using GET_FIELD_SELECTION with Domain Source Filters.For example, add a source filter such as
fact_sales.date >= CASE GET_FIELD_SELECTION(dim_data_cutoff.cutoff, 'week') WHEN 'week' THEN CURRENT_DATE - INTERVAL '7' DAY WHEN 'month' THEN CURRENT_DATE - INTERVAL '1' MONTH WHEN 'year' THEN CURRENT_DATE - INTERVAL '1' YEAR ELSE DATE '1900-01-01' END
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Honeydew Documentation","colors":{"primary":"#abcb1a","light":"#CBE74A","dark":"#9cb918"},"logo":{"light":"https://mintcdn.com/honeydew/FY_ZgBcPUZJ2-No3/logo/logo.svg?fit=max\u0026auto=format\u0026n=FY_ZgBcPUZJ2-No3\u0026q=85\u0026s=10dbf238c7bdb5bb1ee94e85eea8049f","dark":"https://mintcdn.com/honeydew/FY_ZgBcPUZJ2-No3/logo/logo-white.svg?fit=max\u0026auto=format\u0026n=FY_ZgBcPUZJ2-No3\u0026q=85\u0026s=c774c9340ba4f0a8828b7ad8aa1e4179","href":"https://honeydew.ai"},"favicon":"https://mintcdn.com/honeydew/mXl3IrOWJ_NESw09/favicon.png?fit=max\u0026auto=format\u0026n=mXl3IrOWJ_NESw09\u0026q=85\u0026s=4b76e0217dbafaa5c1b88b130a5e62c4","navbar":{"links":[{"href":"https://app.honeydew.cloud/signup","label":"Sign Up"},{"href":"https://app.honeydew.cloud/","label":"Login"},{"href":"https://honeydew.ai","label":"Website"}],"primary":{"type":"button","label":"Book a Demo","href":"https://honeydew.ai/get-started/"}},"footer":{"socials":{"twitter":"https://twitter.com/honeydewai","linkedin":"https://www.linkedin.com/company/honeydewai","github":"https://github.com/honeydew-ai"}},"integrations":{"ga4":{"measurementId":"G-3FG56HVDQ6"},"gtm":{"tagId":"GTM-MNTHZF6"},"hotjar":{"hjid":"3749326","hjsv":"6"},"segment":{"key":"SPDgvdM9OoZSCirKWUQj58GrrjBEzOoE"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"honeydew","hasAudioNarration":false,"actualSubdomain":"honeydew","customDomains":["honeydew.ai"],"gitSource":{"type":"github","owner":"honeydew-ai","repo":"docs","deployBranch":"main","contentDirectory":"content","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeb09fbe84fb046db8b74d1","collectionId":"bd93d249-2ab8-4a00-9172-b288e5de6540","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeb09fbe84fb046db8b74d1"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6aeb09fbe84fb046db8b74d1","clientVersion":"0.0.4071","searchFilterCounts":[{"language":"default","tag":"Integrations","count":48},{"language":"default","tag":"Modeling Reference","count":30},{"language":"default","tag":"BI Tools","count":19},{"language":"default","tag":"Management","count":17},{"language":"default","tag":"Security","count":11},{"language":"default","tag":"Recipes","count":10},{"language":"default","tag":"Advanced Modeling","count":8},{"language":"default","tag":"Authentication","count":7},{"language":"default","tag":"Governance","count":7},{"language":"default","tag":"Context Layer","count":7}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"llms-txt-v2","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":"vite-origin","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":"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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"advanced-modeling/conditional-filtering","slug":"/advanced-modeling/conditional-filtering","pageMetadata":{"title":"Conditional Filtering","description":null,"href":"/advanced-modeling/conditional-filtering"},"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={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`goal`,children:`Goal`}),`\n`,_jsx(_components.p,{children:`Conditional Filtering lets the semantic layer detect and respond to filters coming from a BI tool or an AI agent,\nso that metric logic can adapt dynamically to the user’s query context.`}),`\n`,_jsxs(_components.p,{children:[`So, instead of blindly applying the same transformation or metric calculation every time, the semantic logic can take into\nconsideration the filters the user provided (like `,_jsx(_components.code,{children:`region = Europe`}),`, or `,_jsx(_components.code,{children:`date >= 2024-01-01`}),`).`]}),`\n`,_jsx(_components.p,{children:`That allows to create default data filtering, and to adjust business logic based on user intent.`}),`\n`,_jsx(Heading,{level:`2`,id:`syntax`,children:`Syntax`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`GET_FIELD_SELECTION(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`entity`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`field`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [default value expression])`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Parameters:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Single field (`,_jsx(_components.code,{children:`entity.field`}),`) to detect user filters on`]}),`\n`,_jsxs(_components.li,{children:[`Default value expression in case no user filters on `,_jsx(_components.code,{children:`entity.field`}),` were provided. If not set, the default value is `,_jsx(_components.code,{children:`NULL`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Returns:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The filter value if the BI or AI query filtered `,_jsx(_components.code,{children:`entity.filter`}),` to a `,_jsx(_components.em,{children:`single value`}),`, i.e.\nFor the user filter `,_jsx(_components.code,{children:`entity.field = 'value'`}),`, then would return `,_jsx(_components.code,{children:`value`})]}),`\n`,_jsx(_components.li,{children:`The default value if there was no equality filter.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Only equality filters are detected, as sent by most supported `,_jsx(_components.a,{href:`/integration/bi-tools/supported-tools`,children:`BI tools`}),`.`]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Honeydew uses Conjunctive Normal Form (CNF) decomposition to detect equality filters even when they’re embedded in complex expressions.`})}),`\n`,_jsxs(_components.p,{children:[`For example, given the expression `,_jsx(_components.code,{children:`GET_FIELD_SELECTION(entity.field)`}),` and a user filter -`]}),`\n`,_jsxs(_components.p,{children:[`The following examples would all return `,_jsx(_components.code,{children:`value`}),` given the filter for it:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`entity.field = 'value'`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`entity.field IN ('value')`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`entity.field = 'value' AND entity.other_field = 'other_value'`})}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`However, multiple values, expressions or compound (OR) filters are not detected.\nThe following examples would all return `,_jsx(_components.code,{children:`NULL`}),` (or the default value if set):`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`entity.field || '' = 'value'`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`entity.field IN ('value', 'other')`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`entity.field = 'value' OR entity.other_field = 'value'`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`entity.field >= 'a'`})}),`\n`]}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Using GET_FIELD_SELECTION with Power BI`})}),_jsxs(_components.p,{children:[`Power BI filtering is `,_jsx(_components.a,{href:`/integration/bi-tools/powerbi#case-sensitive-data`,children:`case insensitive`}),`. To support Power BI, always use same (lower or upper) case values.`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`multiple-fallback-tiers`,children:`Multiple Fallback Tiers`}),`\n`,_jsxs(_components.p,{children:[`To fall back across several fields, wrap separate `,_jsx(_components.code,{children:`GET_FIELD_SELECTION`}),` calls in `,_jsx(_components.code,{children:`COALESCE`}),`. With\nno default value a call returns `,_jsx(_components.code,{children:`NULL`}),`, so the leftmost field the user filtered wins:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-- A direct filter on the reference date wins; else a BI selector entity; else today`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`dim_date`}),_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:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` COALESCE`}),_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:` GET_FIELD_SELECTION(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`dim_date`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` GET_FIELD_SELECTION(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`dim_date_choice`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CURRENT_DATE)`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`GET_FIELD_SELECTION`}),` cannot be nested inside another one’s default value expression.`]})}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:`A default value hides the difference between “no filter” and “a filter I could not detect”. Since\nonly equality filters are detected, a query filtering the field to several values or to a range gets\nthe default, and the data is reduced as if the user had asked for nothing.`}),_jsxs(_components.p,{children:[`Where that matters, give the user a way to widen the filter: a two-value scope selector on a\ndisconnected entity, with the wide branch returning `,_jsx(_components.code,{children:`TRUE`}),`, as in\n`,_jsx(_components.a,{href:`/performance/filtering-and-sampling#force-performance-filters-with-conditional-filtering`,children:`performance filtering`}),`.`]})]}),`\n`,_jsxs(Tip,{children:[_jsxs(_components.p,{children:[`Detect filters on the same field the expression constrains, as `,_jsx(_components.code,{children:`dim_date.date`}),` does in the first\ntier above.`]}),_jsxs(_components.p,{children:[`Detecting only a different field leaves a direct filter on the constrained field undetected: the\nexpression resolves to a later tier and is then combined with the user’s own filter, returning the\nintersection of both. See\n`,_jsx(_components.a,{href:`/advanced-modeling/slowly-changing-dimensions#ensuring-filtering-for-a-point-in-time`,children:`ensuring filtering for a point in time`}),`\nfor this pattern applied to versioned data.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`use-cases`,children:`Use Cases`}),`\n`,_jsx(Heading,{level:`3`,id:`change-calculation-based-on-user-intent`,children:`Change Calculation Based on User Intent`}),`\n`,_jsx(_components.p,{children:`Use the filter a user has supplied to change how a metric is calculated.`}),`\n`,_jsx(_components.p,{children:`This is most commonly used to create different metric is calculations at different grains, over the same data.`}),`\n`,_jsx(_components.p,{children:`Examples:`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Dynamic cohorts`})}),`\n`,_jsxs(_components.p,{children:[`Given a `,_jsx(_components.code,{children:`dim_cohort`}),` defining user cohorts, simulate based on cohort choice`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,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:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`sales`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`total_sales_in_cohort`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` sales`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`total_sales`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` FILTER`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` user`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`cohort`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` GET_FIELD_SELECTION(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`dim_cohort`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`cohort_choice`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Per grain logic`})}),`\n`,_jsxs(_components.p,{children:[`Given multiple grains and `,_jsx(_components.code,{children:`dim_grain`}),` selector entity, choose how a metric is calculated at each grain\n(See `,_jsx(_components.a,{href:`/calculations/metrics#different-logic-for-different-grains`,children:`Metrics with different grains`}),`).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`daily_data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`total_revenue`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` CASE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` GET_FIELD_SELECTION(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`dim_grain`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`grain`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- with daily grain simple sum up the revenue`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` WHEN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `daily`\"}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` THEN`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`daily_data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`revenue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- with monthly grain, apply adjustments recorded at end of month`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` WHEN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `monthly`\"}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` THEN`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`daily_data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`revenue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` SUM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`monthly_adjustments`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`revenue_adjustment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` END`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Simulate data based on user selection`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-- Calculate sales based on chosen tax level`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-- Would return different values for different filters the user chooses`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`sales`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`total_sales_simulated_tax`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--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:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`sales`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`sales_pre_tax`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` GET_FIELD_SELECTION(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`dim_tax_level`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`tax_level`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`]})})}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:`Most business logic does not care about user filters, and is only based on the data.`}),_jsxs(_components.p,{children:[`For example when want to calculate differently for 2023 and 2024, then whether the user chose 2023 or 2024\ndoes not matter. How to calculate is a property of the `,_jsx(_components.em,{children:`data`}),`, not what the `,_jsx(_components.em,{children:`user wanted`}),`:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`9`,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:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-- Calculate sales. Accounts for change in tax between 2023/2024`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-- Is the same regardless to user filter`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`sales`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`total_sales`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--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:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`sales`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`sales_pre_tax`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` CASE`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` WHEN`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` sales`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`sale_year`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2023`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` THEN`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`17`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` WHEN`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` sales`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`sale_year`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2024`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` THEN`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`18`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` END`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`However`}),`, when exactly the same data is differently processed based on user intent then must look at user filters,\nas in the `,_jsx(_components.code,{children:`total_sales_simulated_tax`}),` example above.`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`default-filtering`,children:`Default Filtering`}),`\n`,_jsx(_components.p,{children:`Apply a filter on the data by default, unless a user has instructed otherwise.`}),`\n`,_jsx(_components.p,{children:`This is used for:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Reduce Cost \u0026 Improve Performance with BI`}),`: when users build new BI reports, they would typically send unfiltered queries\nlooking at all the data. They usually don’t want to aggregate all the data, but they may have dragged a metric on a dashboard\nfirst and a date filter only after.`]}),`\n`,_jsx(_components.p,{children:`Default filtering enables to apply a filter on the data until the user decided to change it. For example, force a “last 2 weeks”\nfilter on the big fact tables up until the user explicitly asked for more.`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Ensure Correctness By Removing Duplicated Data`}),`: in some data modeling scenarios, data may have multiple versions recorded.\nAggregating on the data would result in double counting and a wrong result.`]}),`\n`,_jsx(_components.p,{children:`Default filtering enables to enforce choosing a specific version of the data, always ensuring there is no double counting.`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Default filtering is typically implemented using `,_jsx(_components.code,{children:`GET_FIELD_SELECTION`}),` with `,_jsx(_components.a,{href:`/domains#source-filters`,children:`Domain Source Filters`}),`.`]}),`\n`,_jsx(_components.p,{children:`For example, add a source filter such as`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`fact_sales`}),_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:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >=`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` CASE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` GET_FIELD_SELECTION(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`dim_data_cutoff`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`cutoff`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'week'`}),_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:` WHEN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'week'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` THEN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CURRENT_DATE `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` INTERVAL `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'7'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` DAY`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` WHEN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'month'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` THEN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CURRENT_DATE `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` INTERVAL `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'1'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` MONTH`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` WHEN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'year'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` THEN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CURRENT_DATE `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` INTERVAL `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'1'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` YEAR`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` ELSE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` DATE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '1900-01-01'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` END`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`See for example:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Default filter for `,_jsx(_components.a,{href:`/performance/filtering-and-sampling#force-performance-filters-with-conditional-filtering`,children:`performance filtering`})]}),`\n`,_jsxs(_components.li,{children:[`Default filter for `,_jsx(_components.a,{href:`/advanced-modeling/multi-grain-tables#domain-level-deduplication`,children:`multi-grain data`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Default filter for `,_jsx(_components.a,{href:`/advanced-modeling/slowly-changing-dimensions#ensuring-filtering-for-a-point-in-time`,children:`slowly changing dimensions`})]}),`\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":"Conditional Filtering","description":null,"href":"/advanced-modeling/conditional-filtering"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Goal","slug":"goal","depth":2,"children":[]},{"title":"Syntax","slug":"syntax","depth":2,"children":[{"title":"Multiple Fallback Tiers","slug":"multiple-fallback-tiers","depth":3,"children":[]}]},{"title":"Use Cases","slug":"use-cases","depth":2,"children":[{"title":"Change Calculation Based on User Intent","slug":"change-calculation-based-on-user-intent","depth":3,"children":[]},{"title":"Default Filtering","slug":"default-filtering","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/honeydew/82b3c90683bc6a9d/script.js"],"subdomain":"honeydew","siteName":"Honeydew Documentation","title":"Conditional Filtering - Honeydew Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T12:57:32.105Z","originalFileLocation":"advanced-modeling/conditional-filtering.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=\"application-name\" content=\"Honeydew Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_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=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Conditional Filtering - Honeydew Documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Honeydew Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://honeydew.ai/docs/advanced-modeling/conditional-filtering\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://honeydew.mintlify.app/_mintlify/api/og/v2?division=Advanced+Modeling\u0026amp;title=Conditional+Filtering\u0026amp;theme=0b845200c1ca80fd78144b6a\u0026amp;signature=31921f68013b52182292b7bbdadab42fe8b01cbebbbad3cd3507faf260a06fe1\">\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=\"Conditional Filtering - Honeydew Documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://honeydew.mintlify.app/_mintlify/api/og/v2?division=Advanced+Modeling\u0026amp;title=Conditional+Filtering\u0026amp;theme=0b845200c1ca80fd78144b6a\u0026amp;signature=31921f68013b52182292b7bbdadab42fe8b01cbebbbad3cd3507faf260a06fe1\">\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=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Honeydew Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#abcb1a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://honeydew.ai/docs/advanced-modeling/conditional-filtering\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/advanced-modeling/conditional-filtering.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://honeydew.ai/#organization\",\"name\":\"Honeydew Documentation\",\"url\":\"https://honeydew.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/honeydew/FY_ZgBcPUZJ2-No3/logo/logo.svg?fit=max\u0026auto=format\u0026n=FY_ZgBcPUZJ2-No3\u0026q=85\u0026s=10dbf238c7bdb5bb1ee94e85eea8049f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://honeydew.ai/docs#website\",\"name\":\"Honeydew Documentation\",\"url\":\"https://honeydew.ai/docs\",\"publisher\":{\"@id\":\"https://honeydew.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://honeydew.ai/docs/advanced-modeling/conditional-filtering#webpage\",\"url\":\"https://honeydew.ai/docs/advanced-modeling/conditional-filtering\",\"name\":\"Conditional Filtering\",\"dateModified\":\"2026-10-29T12:57:32.105Z\",\"isPartOf\":{\"@id\":\"https://honeydew.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://honeydew.ai/docs/advanced-modeling/conditional-filtering#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://honeydew.ai/docs/advanced-modeling/conditional-filtering#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Modeling Reference\",\"item\":\"https://honeydew.ai/docs/architecture\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Advanced Modeling\",\"item\":\"https://honeydew.ai/docs/advanced-modeling/order-of-computation\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Conditional Filtering\",\"item\":\"https://honeydew.ai/docs/advanced-modeling/conditional-filtering\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://honeydew.ai/docs/advanced-modeling/conditional-filtering#article\",\"headline\":\"Conditional Filtering\",\"name\":\"Conditional Filtering\",\"url\":\"https://honeydew.ai/docs/advanced-modeling/conditional-filtering\",\"mainEntityOfPage\":{\"@id\":\"https://honeydew.ai/docs/advanced-modeling/conditional-filtering#webpage\"},\"dateModified\":\"2026-10-29T12:57:32.105Z\",\"publisher\":{\"@id\":\"https://honeydew.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://honeydew.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Honeydew Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Honeydew Documentation","nav":{"global":null,"groups":[{"group":"Quick Start","pages":[{"title":"Introduction","href":"/introduction"},{"title":"TPC-H Walkthrough","href":"/tpch-example"},{"title":"Evaluation Process","href":"/evaluation"},{"title":"Initial Setup","href":"/initial-setup"},{"title":"Support","href":"/support"}]},{"group":"Semantic Ecosystem","pages":[{"title":"Apache Ossie (OSI)","href":"/integration/apache-ossie-osi"},{"title":"From SQL to Honeydew","href":"/migration/sql-guide"},{"title":"From DAX to Honeydew","href":"/migration/dax-guide"},{"title":"From Tableau to Honeydew","href":"/migration/tableau-guide"},{"title":"Import Tools","href":"/migration/import-tools"}]},{"group":"Modeling Reference","pages":[{"title":"Architecture","href":"/architecture"},{"title":"Semantic Compiler","href":"/semantic-compiler"},{"group":"Entity Modeling","pages":[{"title":"Entities","href":"/modeling/entities"},{"title":"Source Data","href":"/modeling/source-data"},{"title":"Relations","href":"/modeling/relations"}]},{"title":"Domains","href":"/domains"},{"group":"Calculations","pages":[{"title":"Attributes","href":"/calculations/attributes"},{"title":"Metrics","href":"/calculations/metrics"},{"title":"Filters","href":"/calculations/filters"}]},{"title":"Datasets","href":"/dynamic-datasets"},{"title":"Parameters","href":"/parameters"},{"group":"Advanced Modeling","pages":[{"title":"Order of Filtering","href":"/advanced-modeling/order-of-computation"},{"title":"Multiple Facts and Shared Dimensions","description":null,"href":"/advanced-modeling/shared-dimensions"},{"title":"Conditional Filtering","href":"/advanced-modeling/conditional-filtering"},{"title":"Multi-Grain Tables","description":null,"href":"/advanced-modeling/multi-grain-tables"},{"title":"Slowly Changing Dimensions","href":"/advanced-modeling/slowly-changing-dimensions"},{"title":"Time Aware Metrics","href":"/advanced-modeling/time-metrics"},{"title":"Time Spines","href":"/advanced-modeling/time-spines"},{"title":"Handling Fan-Out and Chasm Joins","href":"/advanced-modeling/mixing-granularities"}]},{"group":"Recipes","pages":[{"title":"Overview","href":"/recipes/overview"},{"title":"How much revenue comes from a specific category?","sidebarTitle":"Metric for a specific category","href":"/recipes/category-revenue"},{"title":"What share of revenue comes from a specific category?","sidebarTitle":"Category share of total","href":"/recipes/category-revenue-share"},{"title":"Are our customers coming back?","sidebarTitle":"Active customers \u0026 stickiness","href":"/recipes/active-customers"},{"title":"Are we growing compared to last year?","sidebarTitle":"Period-over-period growth","href":"/recipes/yoy-revenue-growth"},{"title":"Are customers spending more per visit?","sidebarTitle":"Fixed level of detail metric","href":"/recipes/avg-order-value"},{"title":"What fraction of orders exceed a revenue threshold?","sidebarTitle":"Share above a threshold","href":"/recipes/high-value-order-share"},{"title":"Which truck has the most consistent daily sales?","sidebarTitle":"Average per day","href":"/recipes/avg-daily-revenue"},{"title":"Can one metric show different numbers to different teams?","sidebarTitle":"BI parameters","href":"/recipes/dynamic-bi-parameters"},{"title":"How do I give different teams their own governed view of the data?","sidebarTitle":"Domain hierarchy","href":"/recipes/domain-hierarchy"}]},{"title":"YAML Schema","href":"/yaml-schema"}]},{"group":"Context Layer","pages":[{"title":"Overview","href":"/integration/context-layer/overview"},{"title":"Deep Analysis","href":"/integration/context-layer/deep-analysis"},{"title":"Agents","href":"/integration/context-layer/agents"},{"title":"Context Management","href":"/integration/context-layer/context-management"},{"title":"AI Metadata","href":"/integration/context-layer/ai-metadata"},{"title":"Building with AI","href":"/integration/context-layer/building-with-ai"},{"title":"YAML Schema","href":"/integration/context-layer/yaml-schema"}]},{"group":"Management","pages":[{"group":"Performance","pages":[{"title":"Overview","href":"/performance/overview"},{"title":"Aggregate Aware Caching","href":"/performance/aggregate-awareness"},{"title":"Incremental Aggregate Updates","href":"/performance/aggregate-incremental-updates"},{"title":"Entity Caching","href":"/performance/entity-caching"},{"title":"Filtering and Sampling","href":"/performance/filtering-and-sampling"}]},{"group":"Governance","pages":[{"title":"Metadata","href":"/governance/metadata"},{"title":"Git Version Control","href":"/governance/git-version-control"},{"title":"Change Approval","href":"/governance/change-approval"},{"group":"CI/CD Workflow","pages":[{"title":"Overview","href":"/governance/ci-cd/overview"},{"title":"GitHub Actions","icon":"github","href":"/governance/ci-cd/github-actions"}]},{"title":"Workspaces","href":"/governance/workspaces"},{"title":"Environments","href":"/governance/environments"}]},{"group":"Monitoring","pages":[{"title":"Query history","href":"/monitoring/query-history"},{"title":"Question history","href":"/monitoring/question-history"},{"title":"Chat history","href":"/monitoring/chat-history"}]},{"title":"User Access Control","href":"/access-control/user-access-control"},{"title":"Row-Level Security","href":"/security/row-level-security"}]},{"group":"Integrations","pages":[{"title":"MCP Server","href":"/integration/mcp"},{"group":"Interfaces","pages":[{"title":"SQL Interface","href":"/integration/sql-interface"},{"title":"GraphQL API","href":"/integration/graphql-api"},{"title":"XMLA Interface","href":"/integration/xmla-interface"},{"title":"Snowflake Native App","icon":"snowflake","href":"/integration/snowflake-native-app"}]},{"group":"AI","pages":[{"title":"Slack App","icon":"slack","href":"/integration/context-layer/slack-app"},{"title":"Microsoft Teams App","icon":"microsoft","href":"/integration/context-layer/teams-app"},{"title":"Build an Embedded AI Analyst UI","sidebarTitle":"Embedded UI","href":"/integration/context-layer/embedded-ui"},{"title":"Streamlit","href":"/integration/context-layer/streamlit"},{"title":"LLM Providers","href":"/integration/context-layer/llm-providers"}]},{"group":"BI Tools","pages":[{"title":"Supported Tools","href":"/integration/bi-tools/supported-tools"},{"title":"Power BI","href":"/integration/bi-tools/powerbi"},{"title":"Excel","href":"/integration/bi-tools/excel"},{"title":"Tableau","href":"/integration/bi-tools/tableau"},{"title":"Looker","href":"/integration/bi-tools/looker"},{"title":"ThoughtSpot","href":"/integration/bi-tools/thoughtspot"},{"title":"Databricks","href":"/integration/bi-tools/databricks"},{"title":"Sigma","href":"/integration/bi-tools/sigma"},{"title":"Domo","href":"/integration/bi-tools/domo"},{"title":"Qlik","href":"/integration/bi-tools/qlik"},{"title":"Amazon Quick","href":"/integration/bi-tools/amazon-quick"},{"title":"Hex","href":"/integration/bi-tools/hex"},{"title":"Deepnote","href":"/integration/bi-tools/deepnote"},{"title":"Superset/Preset","href":"/integration/bi-tools/superset-preset"},{"title":"Metabase","href":"/integration/bi-tools/metabase"},{"title":"Mode Analytics","href":"/integration/bi-tools/mode"},{"title":"Lightdash","href":"/integration/bi-tools/lightdash"},{"title":"Holistics","href":"/integration/bi-tools/holistics"},{"title":"Redash","href":"/integration/bi-tools/redash"}]},{"group":"Catalogs","pages":[{"title":"Data Catalogs","href":"/integration/catalogs/supported-tools"},{"title":"Atlan","href":"/integration/catalogs/atlan"},{"title":"Collibra","href":"/integration/catalogs/collibra"},{"title":"DataHub","href":"/integration/catalogs/datahub"}]},{"group":"Observability","pages":[{"title":"OpenTelemetry","href":"/integration/observability/opentelemetry"}]},{"group":"SQL Clients","pages":[{"title":"Retool","href":"/integration/bi-tools/retool"},{"title":"Database Tools \u0026 IDEs","href":"/integration/bi-tools/sql-tools-ides"},{"title":"Jupyter","href":"/integration/bi-tools/jupyter"},{"title":"Python","href":"/integration/bi-tools/python"},{"title":"JavaScript","href":"/integration/bi-tools/javascript"}]},{"group":"Data Sources","pages":[{"title":"Snowflake","icon":"snowflake","href":"/integration/data-sources/snowflake"},{"title":"Databricks","href":"/integration/data-sources/databricks"},{"title":"Google BigQuery","icon":"google","href":"/integration/data-sources/bigquery"}]},{"group":"Git","pages":[{"title":"GitHub","icon":"github","href":"/integration/git/github"},{"title":"GitLab","icon":"gitlab","href":"/integration/git/gitlab"},{"title":"Bitbucket","icon":"bitbucket","href":"/integration/git/bitbucket"},{"title":"Azure DevOps","icon":"microsoft","href":"/integration/git/azure-devops"}]},{"group":"ELT Tools","pages":[{"title":"Data Pipeline Architecture","href":"/integration/etl-tools/pipeline-architecture"},{"title":"dbt","href":"/integration/etl-tools/dbt"}]}]},{"group":"Security","pages":[{"title":"Security \u0026 Compliance","href":"/security/security"},{"title":"API Keys","href":"/access-control/api-keys"},{"group":"Authentication","pages":[{"title":"Single Sign-On (SSO)","href":"/access-control/sso"},{"title":"Okta SSO Integration (OIDC)","href":"/access-control/okta"},{"title":"Microsoft Entra ID (formerly Azure Active Directory)","href":"/access-control/entra-id"},{"title":"PingIdentity SSO Integration (SAML)","href":"/access-control/ping-identity"},{"title":"OIDC Provider SSO Integration","href":"/access-control/oidc-provider"},{"title":"SAML Provider SSO Integration","href":"/access-control/saml-provider"},{"title":"Windows Authentication (Kerberos)","href":"/access-control/windows-authentication"}]},{"title":"IP Access Control","href":"/access-control/ip-access-control"},{"title":"Vulnerability Disclosure Policy","href":"/security/vulnerability-disclosure-policy"}]},{"group":"Release Notes","pages":[{"title":"Release Notes","href":"/release-notes"}]}]},"basePath":"","title":"Conditional Filtering - Honeydew Documentation","buildId":"dpl_DQCMP4mismmBj3AFK7YZqNhrtLNq","deploymentId":"dpl_DQCMP4mismmBj3AFK7YZqNhrtLNq","dynamics":[],"chunks":[]}