# Modeling

**URL:** https://community.omni.co/c/modeling/5.md?page=1

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

**Page:** 2

---

## [Sharing metadata between Omni and dbt (description, exposures, accepted\_values, and more)](https://community.omni.co/t/sharing-metadata-between-omni-and-dbt-description-exposures-accepted-values-and-more/399)

<div class="topic-metadata">

**Author:** [@conner](https://community.omni.co/u/conner)\
**Replies:** 0\
**Last updated:** [October 7, 2025, 11:28pm UTC](https://community.omni.co/t/sharing-metadata-between-omni-and-dbt-description-exposures-accepted-values-and-more/399 "2025-10-07T23:28:44Z")

</div>

If you’ve spent time building out metadata in your dbt environment, it can be brought into Omni automatically and be helpful for end users. For example, field and table descriptions will automatically show up in the UI a…

---

## [Where'd My Money Go? (How to properly convert from money type to decimal in Postgre)](https://community.omni.co/t/whered-my-money-go-how-to-properly-convert-from-money-type-to-decimal-in-postgre/398)

<div class="topic-metadata">

**Author:** [@samp](https://community.omni.co/u/samp)\
**Replies:** 0\
**Last updated:** [October 2, 2025, 8:46pm UTC](https://community.omni.co/t/whered-my-money-go-how-to-properly-convert-from-money-type-to-decimal-in-postgre/398 "2025-10-02T20:46:58Z")

</div>

Hi all! I recently learned that when you are working off of a PostgreSQL database and convert a MONEY type to DECIMAL, it defaults to DECIMAL(10, 0). That means 10 total digits and 0 digits after the decimal. This resul…

---

## [Why are my schemas and/or tables not appearing in the model IDE?](https://community.omni.co/t/why-are-my-schemas-and-or-tables-not-appearing-in-the-model-ide/156)

<div class="topic-metadata">

**Author:** [@aklance](https://community.omni.co/u/aklance)\
**Replies:** 1\
**Last updated:** [September 30, 2025, 10:04pm UTC](https://community.omni.co/t/why-are-my-schemas-and-or-tables-not-appearing-in-the-model-ide/156 "2025-09-30T22:04:56Z")

</div>

Overview Are you working in your model IDE and notice there are entire schemas and/or tables missing from the list? It’s possible the OMNI\_USER created on your database doesn’t have the appropriate permissions to view or…

---

## [How order\_by\_field parameter works?](https://community.omni.co/t/how-order-by-field-parameter-works/394)

<div class="topic-metadata">

**Author:** [@AdrianaVela](https://community.omni.co/u/AdrianaVela)\
**Replies:** 4\
**Last updated:** [September 26, 2025, 4:05pm UTC](https://community.omni.co/t/how-order-by-field-parameter-works/394 "2025-09-26T16:05:57Z")

</div>

Hello, Im using order\_by\_field parameter with colours parameter in a dimension. This dimension has age groups values (string) and I want to order by 18 - 25, 26 - 30, 31 -35… So I have created a new dimension using a cas…

---

## [Generating dbt exposures using OMNI APIs](https://community.omni.co/t/generating-dbt-exposures-using-omni-apis/392)

<div class="topic-metadata">

**Author:** [@samp](https://community.omni.co/u/samp)\
**Replies:** 1\
**Last updated:** [September 17, 2025, 2:17am UTC](https://community.omni.co/t/generating-dbt-exposures-using-omni-apis/392 "2025-09-17T02:17:51Z")

</div>

Here’s a how-to from the Zello team, hope it helps! We built a pipeline in Pipedream that consumes Omni’s APIs and automatically outputs dbt exposures for dashboards. Step 1. Dashboards and Queries Call /api/v1/docum…

---

## [Extended views for joining the same table with different logic](https://community.omni.co/t/extended-views-for-joining-the-same-table-with-different-logic/319)

<div class="topic-metadata">

**Author:** [@kylee](https://community.omni.co/u/kylee)\
**Replies:** 1\
**Last updated:** [September 10, 2025, 10:28pm UTC](https://community.omni.co/t/extended-views-for-joining-the-same-table-with-different-logic/319 "2025-09-10T22:28:53Z")

</div>

When building data models in Omni, there are times when you’ll want to join the same view more than once – like joining the users table twice, once as sellers and once as buyers. This is covered in a previous article, wh…

---

## [\[LOD\] How many profitable days did we have each month?](https://community.omni.co/t/lod-how-many-profitable-days-did-we-have-each-month/390)

<div class="topic-metadata">

**Author:** [@conor](https://community.omni.co/u/conor)\
**Replies:** 0\
**Last updated:** [September 8, 2025, 11:11pm UTC](https://community.omni.co/t/lod-how-many-profitable-days-did-we-have-each-month/390 "2025-09-08T23:11:47Z")

</div>

Business performance analysis typically focuses heavily on sales metrics. This analysis typically examines performance across different periods, geographies, segmentations, and compares leaders and laggards in those cate…

---

## [\[LOD\] Do longer tenured customers make a larger contribution to sales](https://community.omni.co/t/lod-do-longer-tenured-customers-make-a-larger-contribution-to-sales/389)

<div class="topic-metadata">

**Author:** [@conor](https://community.omni.co/u/conor)\
**Replies:** 0\
**Last updated:** [September 8, 2025, 9:27am UTC](https://community.omni.co/t/lod-do-longer-tenured-customers-make-a-larger-contribution-to-sales/389 "2025-09-08T09:27:14Z")

</div>

Business Question For cohort analysis, people often ask about their business is “do longer tenured customers make a larger contribution to sales?” We can group each user by their first order year and breakdown sales eac…

---

## [How do I download a Topic's related data?](https://community.omni.co/t/how-do-i-download-a-topics-related-data/388)

<div class="topic-metadata">

**Author:** [@litox](https://community.omni.co/u/litox)\
**Replies:** 3\
**Last updated:** [September 3, 2025, 7:08pm UTC](https://community.omni.co/t/how-do-i-download-a-topics-related-data/388 "2025-09-03T19:08:27Z")

</div>

Hello community :waving\_hand: I have a client who puts a lot of effort into getting clean tables with useful logic into Omni. For an integration with an external tool, I’d like to be able to programmatically ingest/ret…

---

## [How to work on dbt models in Omni that aren't yet written into production](https://community.omni.co/t/how-to-work-on-dbt-models-in-omni-that-arent-yet-written-into-production/380)

<div class="topic-metadata">

**Author:** [@jack](https://community.omni.co/u/jack)\
**Replies:** 0\
**Last updated:** [August 11, 2025, 8:22pm UTC](https://community.omni.co/t/how-to-work-on-dbt-models-in-omni-that-arent-yet-written-into-production/380 "2025-08-11T20:22:47Z")

</div>

Create a new dbt model and work on it in an Omni branch Firstly, the model must be built within your development environment. Run the dbt build command, using your development environment Secondly, the code for the db…

---

## [Translating Complex Looker Joins with COALESCE to Omni](https://community.omni.co/t/translating-complex-looker-joins-with-coalesce-to-omni/372)

<div class="topic-metadata">

**Author:** [@conor](https://community.omni.co/u/conor)\
**Replies:** 0\
**Last updated:** [July 31, 2025, 11:26am UTC](https://community.omni.co/t/translating-complex-looker-joins-with-coalesce-to-omni/372 "2025-07-31T11:26:24Z")

</div>

Translating Complex Looker Joins with COALESCE to Omni When migrating from Looker to Omni, one of the more challenging scenarios involves translating complex join patterns that use COALESCE in the join conditions. This a…

---

## [I have tables in my DWH that have different levels of aggregation. How can I use Aggregate Awareness to query dynamically?](https://community.omni.co/t/i-have-tables-in-my-dwh-that-have-different-levels-of-aggregation-how-can-i-use-aggregate-awareness-to-query-dynamically/123)

<div class="topic-metadata">

**Author:** [@liam](https://community.omni.co/u/liam)\
**Replies:** 0\
**Last updated:** [July 15, 2024, 1:41pm UTC](https://community.omni.co/t/i-have-tables-in-my-dwh-that-have-different-levels-of-aggregation-how-can-i-use-aggregate-awareness-to-query-dynamically/123 "2024-07-15T13:41:59Z")

</div>

Let’s say you have a large table of orders for your ecommerce store. Sometimes you need to access the granular level of detail of these orders, eg. to see details about orders that are currently out for Delivery Other …

---

## [Daily Retention Metrics for Cohort Analysis](https://community.omni.co/t/daily-retention-metrics-for-cohort-analysis/352)

<div class="topic-metadata">

**Author:** [@conor](https://community.omni.co/u/conor)\
**Replies:** 0\
**Last updated:** [July 7, 2025, 9:41pm UTC](https://community.omni.co/t/daily-retention-metrics-for-cohort-analysis/352 "2025-07-07T21:41:01Z")

</div>

Overview Daily retention metrics are crucial for understanding user engagement and product stickiness. These are often used in Saas products, gaming and eLearning. This guide demonstrates how to build a comprehensive ret…

---

## [Invalidate Omni's cache with dbt or SQL](https://community.omni.co/t/invalidate-omnis-cache-with-dbt-or-sql/337)

<div class="topic-metadata">

**Author:** [@cmerrick](https://community.omni.co/u/cmerrick)\
**Replies:** 0\
**Last updated:** [June 6, 2025, 4:56pm UTC](https://community.omni.co/t/invalidate-omnis-cache-with-dbt-or-sql/337 "2025-06-06T16:56:52Z")

</div>

We’re going to create a UDF in Snowflake that you can call from dbt or anywhere else. \<something\> means you’ll need to replace that with the relevant value for your environment before running the SQL. Caution: Omni API …

---

## [Edit multiple lines in the IDE at once](https://community.omni.co/t/edit-multiple-lines-in-the-ide-at-once/322)

<div class="topic-metadata">

**Author:** [@conor](https://community.omni.co/u/conor)\
**Replies:** 0\
**Last updated:** [May 7, 2025, 9:46am UTC](https://community.omni.co/t/edit-multiple-lines-in-the-ide-at-once/322 "2025-05-07T09:46:53Z")

</div>

Using Multi-line Editing in Your IDE Need to make identical changes across multiple lines? Save time by editing several lines simultaneously: Hold cmd (command) on Mac or ctrl on Windows/Linux Click each location where…

---

## [Set parameters for multiple calculations](https://community.omni.co/t/set-parameters-for-multiple-calculations/295)

<div class="topic-metadata">

**Author:** [@marcus\_montenegro](https://community.omni.co/u/marcus_montenegro)\
**Replies:** 1\
**Last updated:** [April 4, 2025, 7:17pm UTC](https://community.omni.co/t/set-parameters-for-multiple-calculations/295 "2025-04-04T19:17:44Z")

</div>

Hey everyone! Is there a way that I can set parameters, like environment variables, that I can call across multiple calculations? For example, set a variable named “X” and use it to divide new columns A, B, and C by th…

---

## [Standardizing US State Name Data to State Code](https://community.omni.co/t/standardizing-us-state-name-data-to-state-code/288)

<div class="topic-metadata">

**Author:** [@Becca\_Omni](https://community.omni.co/u/Becca_Omni)\
**Replies:** 1\
**Last updated:** [March 28, 2025, 12:41pm UTC](https://community.omni.co/t/standardizing-us-state-name-data-to-state-code/288 "2025-03-28T12:41:15Z")

</div>

When working with data such as Salesforce data where data validation for US state input fields doesn’t always exist, you may need to ensure the data you’re presenting all rolls up correctly without seeing CA and Californ…

---

## [Issue with Top 10 Filter Removal in Query after joining](https://community.omni.co/t/issue-with-top-10-filter-removal-in-query-after-joining/282)

<div class="topic-metadata">

**Author:** [@Amihai](https://community.omni.co/u/Amihai)\
**Replies:** 1\
**Last updated:** [March 24, 2025, 8:06am UTC](https://community.omni.co/t/issue-with-top-10-filter-removal-in-query-after-joining/282 "2025-03-24T08:06:58Z")

</div>

I created my top 10 list using aggregation, saved it as a view, and joined it with my main topic. However, the top 10 filter was removed from my query, resulting in the full list. How can I fix this?

---

## [Calendar Tables (date spine)](https://community.omni.co/t/calendar-tables-date-spine/252)

<div class="topic-metadata">

**Author:** [@russ](https://community.omni.co/u/russ)\
**Replies:** 0\
**Last updated:** [March 3, 2025, 4:53am UTC](https://community.omni.co/t/calendar-tables-date-spine/252 "2025-03-03T04:53:39Z")

</div>

You might have heard of a “calendar table” or “date spine”. It’s a technique that starts with a contiguous time series and can be useful in a few scenarios: Unifying multiple timestamps on the same common x-axis Sparse…

---

## [Multiplying or Dividing Dimensions and Measures in the Data Model Using \`in\_query\`](https://community.omni.co/t/multiplying-or-dividing-dimensions-and-measures-in-the-data-model-using-in-query/207)

<div class="topic-metadata">

**Author:** [@colin](https://community.omni.co/u/colin)\
**Replies:** 0\
**Last updated:** [January 2, 2025, 11:33pm UTC](https://community.omni.co/t/multiplying-or-dividing-dimensions-and-measures-in-the-data-model-using-in-query/207 "2025-01-02T23:33:47Z")

</div>

In most SQL dialects, one can only do math between dimensions (things in the group by) and measures (aggregates, not in the group by) when said dimensions are in the query. Omni restricts these query-structure contingen…

---

## [Please share the resource](https://community.omni.co/t/please-share-the-resource/214)

<div class="topic-metadata">

**Author:** [@shekhar](https://community.omni.co/u/shekhar)\
**Replies:** 3\
**Last updated:** [January 27, 2025, 9:06pm UTC](https://community.omni.co/t/please-share-the-resource/214 "2025-01-27T21:06:21Z")

</div>

I am new to omni , can you please share the resource so that I can learn faster

---

## [Filtered Measures with Dynamic Timeframe Swappers in the UI](https://community.omni.co/t/filtered-measures-with-dynamic-timeframe-swappers-in-the-ui/219)

<div class="topic-metadata">

**Author:** [@kylee](https://community.omni.co/u/kylee)\
**Replies:** 0\
**Last updated:** [January 24, 2025, 4:50am UTC](https://community.omni.co/t/filtered-measures-with-dynamic-timeframe-swappers-in-the-ui/219 "2025-01-24T04:50:34Z")

</div>

There are many use cases where you may want multiple measures included in a single query but with different date fields applied to them. For instance say we want to find the number of created opportunities and number of …

---

## [Looker Liquid style](https://community.omni.co/t/looker-liquid-style/164)

<div class="topic-metadata">

**Author:** [@Ben](https://community.omni.co/u/Ben)\
**Replies:** 2\
**Last updated:** [October 31, 2024, 11:59am UTC](https://community.omni.co/t/looker-liquid-style/164 "2024-10-31T11:59:30Z")

</div>

Hi How do I solve the problem in Omni that a measure is dependent on the dimensions selected? So as an example: The customer has selected the delivery month in his analysis. Then the correct math is: Value / number o…

---

## [How do I prevent my aggregations from counting duplicates when my query fans out?](https://community.omni.co/t/how-do-i-prevent-my-aggregations-from-counting-duplicates-when-my-query-fans-out/172)

<div class="topic-metadata">

**Author:** [@liam](https://community.omni.co/u/liam)\
**Replies:** 0\
**Last updated:** [October 24, 2024, 10:22am UTC](https://community.omni.co/t/how-do-i-prevent-my-aggregations-from-counting-duplicates-when-my-query-fans-out/172 "2024-10-24T10:22:09Z")

</div>

Firstly, let’s talk about why we need to consider fan-out. Let’s say we have the following table of orders If we want to get the sum of price on our orders, we simply do a sum of each of the values select SUM(price)…

---

## [How can I dynamically average over pivots](https://community.omni.co/t/how-can-i-dynamically-average-over-pivots/162)

<div class="topic-metadata">

**Author:** [@conor](https://community.omni.co/u/conor)\
**Replies:** 0\
**Last updated:** [October 10, 2024, 10:06am UTC](https://community.omni.co/t/how-can-i-dynamically-average-over-pivots/162 "2024-10-10T10:06:36Z")

</div>

Often you might want to pivot by a timeframe and get an average on the measure over the groupings within the timeframes. For example you might want to get the weekly active users for the last 4 weeks. Then average this v…

---

## [Join tables in Omni Analytics](https://community.omni.co/t/join-tables-in-omni-analytics/159)

<div class="topic-metadata">

**Author:** [@Tomer\_vision.bi](https://community.omni.co/u/Tomer_vision.bi)\
**Replies:** 1\
**Last updated:** [October 1, 2024, 10:13am UTC](https://community.omni.co/t/join-tables-in-omni-analytics/159 "2024-10-01T10:13:31Z")

</div>

Hi Omnis, I tried to do join between two tables, the join needs 3 keys in order to be unique, but each time the option is only join by 1 key. How I can solve this issue?

---

## [Joining to an aliased view](https://community.omni.co/t/joining-to-an-aliased-view/139)

<div class="topic-metadata">

**Author:** [@conor](https://community.omni.co/u/conor)\
**Replies:** 0\
**Last updated:** [August 13, 2024, 8:31pm UTC](https://community.omni.co/t/joining-to-an-aliased-view/139 "2024-08-13T20:31:01Z")

</div>

Sometimes views need to be aliased or duplicated and can be automatically created using joins. In a previous article How to join the same table twice we used aliasing to join the same tables in different ways. In that ca…

---

## [Different types of Drill Downs in Omni](https://community.omni.co/t/different-types-of-drill-downs-in-omni/131)

<div class="topic-metadata">

**Author:** [@liam](https://community.omni.co/u/liam)\
**Replies:** 0\
**Last updated:** [July 30, 2024, 11:24am UTC](https://community.omni.co/t/different-types-of-drill-downs-in-omni/131 "2024-07-30T11:24:03Z")

</div>

“Drill downs” are a great way to dynamically interact with your data. What are the different types of drill downs you can set up? Row Level Drilling These are drill fields that you configure on measures. It allows you …

---

## [How do I customize drill fields?](https://community.omni.co/t/how-do-i-customize-drill-fields/75)

<div class="topic-metadata">

**Author:** [@conner](https://community.omni.co/u/conner)\
**Replies:** 0\
**Last updated:** [May 29, 2024, 7:35pm UTC](https://community.omni.co/t/how-do-i-customize-drill-fields/75 "2024-05-29T19:35:20Z")

</div>

Drilling is a great way to invite users to dig deeper into the data. For example, if you have a measure Order Items Count with a value of 10, drilling lets you see more details on those 10 Order Items. By default, when …

---

## [How do I delete a model / database connection?](https://community.omni.co/t/how-do-i-delete-a-model-database-connection/118)

<div class="topic-metadata">

**Author:** [@conner](https://community.omni.co/u/conner)\
**Replies:** 0\
**Last updated:** [July 3, 2024, 6:59pm UTC](https://community.omni.co/t/how-do-i-delete-a-model-database-connection/118 "2024-07-03T18:59:09Z")

</div>

If you’d like to delete one of your models / database connections, navigate to the model file and go to Model \> Move model to trash.

[Previous page](https://community.omni.co/c/modeling/5.md)

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