# Modeling

**URL:** https://community.omni.co/c/modeling/5.md

[Latest](https://community.omni.co/latest.md) · [Categories](https://community.omni.co/categories.md) · [Tags](https://community.omni.co/tags.md)

---

## [About the Modeling category](https://community.omni.co/t/about-the-modeling-category/19)

<div class="topic-metadata">

**Author:** [@conner](https://community.omni.co/u/conner)\
**Replies:** 0

</div>

Questions, tips, and how-to’s for anything related to data modeling in Omni. Documentation: Overview | Omni Analytics Documentation

---

## [Keep Omni AI Context Updated Programmatically with the CLI + Claude Code](https://community.omni.co/t/keep-omni-ai-context-updated-programmatically-with-the-cli-claude-code/470)

<div class="topic-metadata">

**Author:** [@Benedikt](https://community.omni.co/u/Benedikt)\
**Replies:** 0\
**Last updated:** [July 21, 2026, 10:39am UTC](https://community.omni.co/t/keep-omni-ai-context-updated-programmatically-with-the-cli-claude-code/470 "2026-07-21T10:39:46Z")

</div>

Every Omni model has an AI context problem eventually. Someone asks a normal question, the agent picks the wrong field, and you realize your context is stale — because it was written once, by hand, and nobody’s touched i…

---

## [Building a parameter-driven calculation in Omni via templated filters](https://community.omni.co/t/building-a-parameter-driven-calculation-in-omni-via-templated-filters/469)

<div class="topic-metadata">

**Author:** [@brianvu](https://community.omni.co/u/brianvu)\
**Replies:** 0\
**Last updated:** [July 21, 2026, 6:37am UTC](https://community.omni.co/t/building-a-parameter-driven-calculation-in-omni-via-templated-filters/469 "2026-07-21T06:37:39Z")

</div>

When I first started at Omni, one of my early support tickets was a customer creating a parameter that let them dynamically adjust a threshold, and a calculated field that recalculated based on whatever value was in that…

---

## [Removing fields with Content Validator](https://community.omni.co/t/removing-fields-with-content-validator/460)

<div class="topic-metadata">

**Author:** [@Eric\_Hoffman](https://community.omni.co/u/Eric_Hoffman)\
**Replies:** 1\
**Last updated:** [July 14, 2026, 10:55pm UTC](https://community.omni.co/t/removing-fields-with-content-validator/460 "2026-07-14T22:55:58Z")

</div>

I use the Content Validator to replace fields and views, but in this case the field is no longer available in our model and needs to be removed altogether. There is no new field to replace the old field with. Is there …

---

## [Time out issues when trying to pick up a value from a filter](https://community.omni.co/t/time-out-issues-when-trying-to-pick-up-a-value-from-a-filter/463)

<div class="topic-metadata">

**Author:** [@Isma](https://community.omni.co/u/Isma)\
**Replies:** 1\
**Last updated:** [July 14, 2026, 10:37pm UTC](https://community.omni.co/t/time-out-issues-when-trying-to-pick-up-a-value-from-a-filter/463 "2026-07-14T22:37:36Z")

</div>

There is a topic that looks for 1 year of data. While it performs well and handles adding new columns as expected, I’ve encountered an issue with data filtering. When applying a new filter and trying to pick a value, Om…

---

## [Input values within a pivot](https://community.omni.co/t/input-values-within-a-pivot/465)

<div class="topic-metadata">

**Author:** [@jo\_j](https://community.omni.co/u/jo_j)\
**Replies:** 4\
**Last updated:** [July 13, 2026, 11:01am UTC](https://community.omni.co/t/input-values-within-a-pivot/465 "2026-07-13T11:01:01Z")

</div>

I’m trying out the input columns and have a use case where I want to have the input column within a pivot. So for example I have month pivoted across the top and I have the dimension attributes on the left. Within each …

---

## [Querying Struct Types in Omni](https://community.omni.co/t/querying-struct-types-in-omni/462)

<div class="topic-metadata">

**Author:** [@Jaime](https://community.omni.co/u/Jaime)\
**Replies:** 0\
**Last updated:** [June 3, 2026, 9:15pm UTC](https://community.omni.co/t/querying-struct-types-in-omni/462 "2026-06-03T21:15:38Z")

</div>

This article will use a Databricks connection in Omni where you can query your struct types. Note that other data platforms like Google Cloud’s BigQuery also have structs and they will follow a similar syntax, like using…

---

## [Create a timezone picker for your end users](https://community.omni.co/t/create-a-timezone-picker-for-your-end-users/456)

<div class="topic-metadata">

**Author:** [@Jiro](https://community.omni.co/u/Jiro)\
**Replies:** 3\
**Last updated:** [May 4, 2026, 9:23pm UTC](https://community.omni.co/t/create-a-timezone-picker-for-your-end-users/456 "2026-05-04T21:23:45Z")

</div>

The Problem UPDATE - once enabled in the org Settings panel, you can show users a timezone override dropdown in dashboards (demo here – expected to be available week of May 4th) Some use cases require flexibile timezon…

---

## [New fields added to view after Refresh Schema, but Omni still throw "Field not found" error](https://community.omni.co/t/new-fields-added-to-view-after-refresh-schema-but-omni-still-throw-field-not-found-error/454)

<div class="topic-metadata">

**Author:** [@khoa.ngo](https://community.omni.co/u/khoa.ngo)\
**Replies:** 2\
**Last updated:** [May 2, 2026, 2:09am UTC](https://community.omni.co/t/new-fields-added-to-view-after-refresh-schema-but-omni-still-throw-field-not-found-error/454 "2026-05-02T02:09:45Z")

</div>

Hi, this is my issue: I add new columns to a table I click refresh schema the new columns are detected and correctly added to the view files Omni says “column not found” for those exact columns Error messa…

---

## [Using Omni Local Model Editor to vibe-code AI Context](https://community.omni.co/t/using-omni-local-model-editor-to-vibe-code-ai-context/427)

<div class="topic-metadata">

**Author:** [@liam](https://community.omni.co/u/liam)\
**Replies:** 1\
**Last updated:** [March 19, 2026, 2:51pm UTC](https://community.omni.co/t/using-omni-local-model-editor-to-vibe-code-ai-context/427 "2026-03-19T14:51:19Z")

</div>

Using Cursor + Omni’s Local Model Editor to Auto-Generate AI Context I’ve been experimenting with Omni’s local model editor package, and I wanted to share a workflow that’s been working really well for me: using Cursor t…

---

## [How to Dynamically Group the Last N Days vs. the Rest of Your Data 📅](https://community.omni.co/t/how-to-dynamically-group-the-last-n-days-vs-the-rest-of-your-data/448)

<div class="topic-metadata">

**Author:** [@ryan](https://community.omni.co/u/ryan)\
**Replies:** 0\
**Last updated:** [February 19, 2026, 5:22pm UTC](https://community.omni.co/t/how-to-dynamically-group-the-last-n-days-vs-the-rest-of-your-data/448 "2026-02-19T17:22:01Z")

</div>

Ever wanted a quick, hands-off way to see how your metrics for the last 7 days stack up against everything else? Now you can build dynamic grouping directly into your data model! Here is a quick step-by-step guide on h…

---

## [Building a Dynamic, Single-Pass Funnel Explorer using MATCH\_RECOGNIZE and Templated Filters](https://community.omni.co/t/building-a-dynamic-single-pass-funnel-explorer-using-match-recognize-and-templated-filters/446)

<div class="topic-metadata">

**Author:** [@ernesto](https://community.omni.co/u/ernesto)\
**Replies:** 0\
**Last updated:** [February 18, 2026, 1:30pm UTC](https://community.omni.co/t/building-a-dynamic-single-pass-funnel-explorer-using-match-recognize-and-templated-filters/446 "2026-02-18T13:30:05Z")

</div>

If you’ve ever tried to build a Funnel Explorer in SQL, you know the pain of writing massive, slow queries filled with nested LEFT JOINs and hardcoded event names. I recently worked through a much better pattern using S…

---

## [How to use Topics to curate data: Joins, data access, filters, and available fields](https://community.omni.co/t/how-to-use-topics-to-curate-data-joins-data-access-filters-and-available-fields/445)

<div class="topic-metadata">

**Author:** [@conner](https://community.omni.co/u/conner)\
**Replies:** 2\
**Last updated:** [February 11, 2026, 10:57pm UTC](https://community.omni.co/t/how-to-use-topics-to-curate-data-joins-data-access-filters-and-available-fields/445 "2026-02-11T22:57:59Z")

</div>

Creating Topics in Omni is a great way to help users navigate your data more easily. Topics bring together relevant tables, joins, measures, and dimensions into a logical structure that matches how business users think a…

---

## [Use an LLM to Generate AI Context for You](https://community.omni.co/t/use-an-llm-to-generate-ai-context-for-you/444)

<div class="topic-metadata">

**Author:** [@Averyrobins](https://community.omni.co/u/Averyrobins)\
**Replies:** 0\
**Last updated:** [February 11, 2026, 7:38pm UTC](https://community.omni.co/t/use-an-llm-to-generate-ai-context-for-you/444 "2026-02-11T19:38:37Z")

</div>

You’ve read about how providing AI context in Omni’s ai\_context parameter improves accuracy, consistency, and most importantly, trust in the analytics you build with AI. But did you know that you can use an LLM of your c…

---

## [Use Sample Queries to Optimize Your Model for AI](https://community.omni.co/t/use-sample-queries-to-optimize-your-model-for-ai/443)

<div class="topic-metadata">

**Author:** [@Averyrobins](https://community.omni.co/u/Averyrobins)\
**Replies:** 0\
**Last updated:** [February 11, 2026, 6:41pm UTC](https://community.omni.co/t/use-sample-queries-to-optimize-your-model-for-ai/443 "2026-02-11T18:41:46Z")

</div>

AI has generated a massive amount of hype in the BI world over the past several years, and rightfully so! Leveraging it against your company’s data can save time, money, and headaches. But there’s a catch: most AI-powere…

---

## [Best practices for handling multiple foreign keys to a single User Master table (role-playing dimensions)](https://community.omni.co/t/best-practices-for-handling-multiple-foreign-keys-to-a-single-user-master-table-role-playing-dimensions/442)

<div class="topic-metadata">

**Author:** [@revati](https://community.omni.co/u/revati)\
**Replies:** 5\
**Last updated:** [February 10, 2026, 7:56pm UTC](https://community.omni.co/t/best-practices-for-handling-multiple-foreign-keys-to-a-single-user-master-table-role-playing-dimensions/442 "2026-02-10T19:56:56Z")

</div>

Hi everyone! We are looking for the most scalable way to model our User Master list in Omni. Currently, our schema has multiple tables that reference the User table via different foreign keys. For example: Tasks Tabl…

---

## [Semi Additive Measures](https://community.omni.co/t/semi-additive-measures/120)

<div class="topic-metadata">

**Author:** [@liam](https://community.omni.co/u/liam)\
**Replies:** 2\
**Last updated:** [January 28, 2026, 11:36pm UTC](https://community.omni.co/t/semi-additive-measures/120 "2026-01-28T23:36:15Z")

</div>

Sometimes, your data is structured in such a way that you can’t just add up all the values to get the total. Examples of this are a daily table of bank balances, your company’s ARR, or the number of items you have in inv…

---

## [How to sort a custom markdown visualization dynamically in dashboard view](https://community.omni.co/t/how-to-sort-a-custom-markdown-visualization-dynamically-in-dashboard-view/435)

<div class="topic-metadata">

**Author:** [@nate](https://community.omni.co/u/nate)\
**Replies:** 1\
**Last updated:** [January 5, 2026, 11:34pm UTC](https://community.omni.co/t/how-to-sort-a-custom-markdown-visualization-dynamically-in-dashboard-view/435 "2026-01-05T23:34:25Z")

</div>

TL;DR If your custom visualization markdown tile needs dynamic sorting, move sort logic into an Omni query view. Create ranked columns for each sort option, expose them as dashboard controls, and sort the results set by …

---

## [Rank Pivots by a Measure (Top N)](https://community.omni.co/t/rank-pivots-by-a-measure-top-n/225)

<div class="topic-metadata">

**Author:** [@russ](https://community.omni.co/u/russ)\
**Replies:** 1\
**Last updated:** [December 18, 2025, 4:39pm UTC](https://community.omni.co/t/rank-pivots-by-a-measure-top-n/225 "2025-12-18T16:39:39Z")

</div>

NOTE: Omni has now released Top N functionality natively in the workbook. \* How do I get it? In the workbook’s field browser, right click on a field and select the Top N option. There are still some instances where the…

---

## [When to Refresh What: Schema vs. Cache](https://community.omni.co/t/when-to-refresh-what-schema-vs-cache/430)

<div class="topic-metadata">

**Author:** [@James](https://community.omni.co/u/James)\
**Replies:** 0\
**Last updated:** [December 8, 2025, 11:04pm UTC](https://community.omni.co/t/when-to-refresh-what-schema-vs-cache/430 "2025-12-08T23:04:55Z")

</div>

A quick guide on deciding when to refresh schema and when to refresh cache in Omni. What’s the Difference? Schema refresh updates Omni’s understanding of your database structure (tables, columns, views). Cache refresh …

---

## [How to incrementally revert workbook model changes using branches](https://community.omni.co/t/how-to-incrementally-revert-workbook-model-changes-using-branches/425)

<div class="topic-metadata">

**Author:** [@James](https://community.omni.co/u/James)\
**Replies:** 0\
**Last updated:** [November 20, 2025, 9:41pm UTC](https://community.omni.co/t/how-to-incrementally-revert-workbook-model-changes-using-branches/425 "2025-11-20T21:41:17Z")

</div>

This guide will show you how to leverage branches to incrementally revert changes. Let’s start with a workbook that has some workbook model changes. In this workbook I have some custom aggregates and a duplicate field D…

---

## [How to join the same table twice](https://community.omni.co/t/how-to-join-the-same-table-twice/46)

<div class="topic-metadata">

**Author:** [@conor](https://community.omni.co/u/conor)\
**Replies:** 4\
**Last updated:** [November 19, 2025, 1:58am UTC](https://community.omni.co/t/how-to-join-the-same-table-twice/46 "2025-11-19T01:58:00Z")

</div>

When modeling topics, simplicity in naming conventions is key. Our goal to make the BI layer self-serve beings with prioritizing ease of navigation for our end users. Aliasing joins is a good start to build out tables …

---

## [AI Context Template/Examples](https://community.omni.co/t/ai-context-template-examples/420)

<div class="topic-metadata">

**Author:** [@AdrianaVela](https://community.omni.co/u/AdrianaVela)\
**Replies:** 9\
**Last updated:** [November 18, 2025, 3:12pm UTC](https://community.omni.co/t/ai-context-template-examples/420 "2025-11-18T15:12:26Z")

</div>

Hello, I have been working with some clients on how to optimize and tune the model when we are talking about using ai\_context at the model, topic, or view level. One of the most frequently asked questions are what type o…

---

## [\[LOD\] Comparing metrics to a custom time range](https://community.omni.co/t/lod-comparing-metrics-to-a-custom-time-range/422)

<div class="topic-metadata">

**Author:** [@adrienb](https://community.omni.co/u/adrienb)\
**Replies:** 0\
**Last updated:** [November 13, 2025, 12:57am UTC](https://community.omni.co/t/lod-comparing-metrics-to-a-custom-time-range/422 "2025-11-13T00:57:01Z")

</div>

This Level-of-Detail example walks through creating the following analysis, where a user-selected time period serves as the benchmark against which to compare a different time period. For example, in this screenshot we c…

---

## [References in the Content Validator - Quick Guide](https://community.omni.co/t/references-in-the-content-validator-quick-guide/421)

<div class="topic-metadata">

**Author:** [@James](https://community.omni.co/u/James)\
**Replies:** 0\
**Last updated:** [November 11, 2025, 11:09pm UTC](https://community.omni.co/t/references-in-the-content-validator-quick-guide/421 "2025-11-11T23:09:09Z")

</div>

When searching with the content validator or replacing views, fields, and topics, it’s important to reference each object using the proper view names, fully-scoped fields, and topic identifiers. Note: Content Validator …

---

## [References in the Model - Quick Guide](https://community.omni.co/t/references-in-the-model-quick-guide/418)

<div class="topic-metadata">

**Author:** [@James](https://community.omni.co/u/James)\
**Replies:** 0\
**Last updated:** [November 10, 2025, 10:52pm UTC](https://community.omni.co/t/references-in-the-model-quick-guide/418 "2025-11-10T22:52:42Z")

</div>

Omni’s modeling syntax provides flexible and powerful ways to reference fields, views, and filters in your data models. This guide outlines best practices for using field references and Mustache templating to make your m…

---

## [How to restore a view that is ignored in the shared model, from within a branch](https://community.omni.co/t/how-to-restore-a-view-that-is-ignored-in-the-shared-model-from-within-a-branch/408)

<div class="topic-metadata">

**Author:** [@James](https://community.omni.co/u/James)\
**Replies:** 0\
**Last updated:** [October 22, 2025, 10:21pm UTC](https://community.omni.co/t/how-to-restore-a-view-that-is-ignored-in-the-shared-model-from-within-a-branch/408 "2025-10-22T22:21:20Z")

</div>

Here’s how to restore a view that is ignored in the shared model, from within a branch. What you’re seeing View files can be ignored which will remove them from the Combined model view and move them into Model mode (S…

---

## [\[LOD\] Comparative sales analysis](https://community.omni.co/t/lod-comparative-sales-analysis/407)

<div class="topic-metadata">

**Author:** [@adrienb](https://community.omni.co/u/adrienb)\
**Replies:** 0\
**Last updated:** [October 22, 2025, 9:57pm UTC](https://community.omni.co/t/lod-comparative-sales-analysis/407 "2025-10-22T21:57:49Z")

</div>

A comparative sales analysis provides a quick visual way to benchmark or compare metrics across key business dimensions. We would like an output like this, where the Comparison Category serves as the basis against which …

---

## [Testing dbt changes in Omni before pushing to production (Omni's dynamic dbt environments)](https://community.omni.co/t/testing-dbt-changes-in-omni-before-pushing-to-production-omnis-dynamic-dbt-environments/401)

<div class="topic-metadata">

**Author:** [@conner](https://community.omni.co/u/conner)\
**Replies:** 0\
**Last updated:** [October 7, 2025, 11:44pm UTC](https://community.omni.co/t/testing-dbt-changes-in-omni-before-pushing-to-production-omnis-dynamic-dbt-environments/401 "2025-10-07T23:44:29Z")

</div>

When you’re editing a dbt model, a seemingly minor change (like renaming a column or updating a WHERE clause) can quietly break dozens of downstream charts. Omni’s dynamic dbt environments give you a tight software devel…

---

## [Turning Omni saved query views into dbt models](https://community.omni.co/t/turning-omni-saved-query-views-into-dbt-models/400)

<div class="topic-metadata">

**Author:** [@conner](https://community.omni.co/u/conner)\
**Replies:** 0\
**Last updated:** [October 7, 2025, 11:32pm UTC](https://community.omni.co/t/turning-omni-saved-query-views-into-dbt-models/400 "2025-10-07T23:32:57Z")

</div>

As teams explore in Omni, useful transformations will naturally emerge. Instead of leaving them as one-off queries, you can save the query as an Omni view — a lightweight, virtual transformation (like a CTE you can refer…

[Next page](https://community.omni.co/c/modeling/5.md?page=1)
