Zoho Analytics · Business Intelligence · Custom Reports · Custom SQL Reporting · Query Tables · SQL · SQL in Zoho Analytics · Zoho Analytics · Zoho Analytics Data Modeling · Zoho Analytics Formulas · Zoho Analytics Joins · Zoho Analytics Query Tables · Zoho Analytics SQL Tutorial · Zoho Analytics Tips · Zoho Analytics Tutorial
Analytics Data Modeling: Joins, Formulas & Tips
A practical guide to Zoho Analytics data modeling: choose the right joins, write reusable formulas, use query tables and avoid duplicated totals.

Analytics Data Modeling: Joins, Formulas & Tips
Most reporting problems are not chart problems. They are data problems. Totals that don't match, duplicated rows after a join, and the same metric calculated three different ways in three different dashboards all trace back to how the data is organized. Good Zoho Analytics data modeling fixes this at the source, so every report you build on top is faster to create and easier to trust.
This guide is for analysts and power users. It covers how to think about your model, how to choose between joins, formulas and query tables, and how to avoid the mistakes that cause wrong numbers.
> Quick answer / key takeaways
> - Data modeling means deciding which tables you need, how they relate, and where each calculation lives, before you build reports.
> - Use joins or lookups to connect tables, formulas for row-level or summary calculations, and query tables for complex SQL logic.
> - Keep each table at a clear grain (one row per what?) to prevent duplicated rows and inflated totals.
> - Define each metric once, in the model, and reuse it across reports.
> - Test every new join and formula against a known total before building on it.
What is data modeling in Zoho Analytics?
Data modeling is the work you do between importing data and building reports. You decide how tables connect, which fields to calculate, and which tables to reshape so that reports can stay simple.
In practice, a model in Zoho Analytics is a set of tables, from CRM, Zoho Books, files or databases, plus the relationships, formula columns and query tables you add on top. A clean model means a report author can drag a field onto a chart without worrying about whether it will double count.
Start with the grain of each table
Before you join anything, answer one question for every table: what does one row represent?
A Deals table might have one row per deal.
An Invoice Lines table might have one row per line item.
A Customers table might have one row per customer.
This is the table's grain. Problems appear when you join tables of different grain and then sum a value from the coarser table. For example, if you join customers to invoice lines and then sum a customer-level field, that value is repeated once per line, and your total is inflated.
A simple habit helps: write the grain next to each table's name in your documentation, and check it again before every join.
Zoho Analytics joins: connecting your tables
Zoho Analytics joins let you combine data from more than one table. Two things matter most: the join type and the join key.
Choose the right join type
| Join type | Returns | Use it when |
| Inner join | Only rows that match in both tables | You only care about records that exist on both sides |
| Left join | All rows from the first table, plus matches from the second | You want to keep every record from the main table, even without a match |
| Right join | All rows from the second table, plus matches from the first | You want the reverse of a left join |
| Full outer join | All rows from both tables | You need to see unmatched rows on either side |
If a left join is available to you, it is often the safest default for reporting, because it does not silently drop records from your main table.
Choose a reliable join key
Join on stable identifiers, such as an account ID, rather than on names or free-text fields. Names change, contain typos and differ in case or spacing. IDs don't.
Check the result after every join
After you create a join, run three quick checks:
Row count. Is it what you expected? A jump in rows often means duplicate keys.
Null values. Are there unmatched rows you did not expect?
A known total. Does a sum match the source table?
Zoho Analytics formulas: calculations that stay consistent
Zoho Analytics formulas let you create calculated fields without changing your source data. Broadly, there are two kinds you will use:
- Row-level formulas calculate a value for each row, for example a deal size band, a full name from two fields, or the number of days between two dates.
- Aggregate or summary calculations calculate a value across many rows, for example total revenue, average deal size or a conversion rate.
Where to put a formula
Put a formula in the model, not in each report, whenever the logic will be reused. If five reports need "days to close," define it once as a column in the table. Then a change to the rule updates every report that uses it.
A few formula habits
- Handle empty values. Decide what a blank should mean, such as zero, unknown or excluded, and write that into the formula.
- Be explicit about types. Make sure you are doing arithmetic on numbers and date calculations on date fields.
- Keep formulas readable. Break a long calculation into steps, or use a clear field name to explain it.
- Beware of averaging averages. Calculate rates from totals, such as total won divided by total deals, rather than averaging percentages from groups of different size.
Zoho Analytics query tables: when SQL is the better tool
Zoho Analytics query tables let you define a table with a SQL SELECT statement. They are the right choice when joins and formulas on their own become awkward or hard to maintain.
Reach for a query table when you need to:
Join several tables with specific conditions in one step.
Pre-aggregate data, such as one row per customer per month.
Apply complex conditional logic with CASE expressions.
Reshape or clean data before it reaches your reports.
Build one trusted "reporting table" that many dashboards use.
Here is a small example that creates one row per account with its deal count and pipeline value:
_____sql
SELECT a."Account Name",
COUNT(d."Deal ID") AS "Open Deals",
SUM(d."Amount") AS "Pipeline Value"
FROM "Accounts" a
LEFT JOIN "Deals" d
ON a."Account ID" = d."Account ID"
AND d."Stage" <> 'Closed Lost'
GROUP BY a."Account Name"
_____sql
The table and column names above are placeholders. Replace them with the names in your own workspace, and test the result against a known total.
Joins, formulas or query tables: which should you use?
| Situation | Best fit |
| Add a simple calculated field to one table | Formula |
| Connect two tables by a clear key for reporting | Join |
| Combine many tables with custom conditions | Query table |
| Create one-row-per-customer summaries | Query table |
| Classify rows into bands or groups | Formula or query table with CASE |
| Reuse the same logic in many reports | Formula or query table, defined once |
When two options both work, pick the simpler one. A formula is easier for the next person to read than a long SQL statement.
Data modeling tips for analysts
Model in layers. Keep raw imported tables untouched, then build cleaned tables on top, then reporting tables on top of those. Each layer is easier to debug.
Name things clearly. Use consistent, descriptive names for tables and fields so other users can find them.
Bring in only what you need. Extra tables and columns add clutter and can slow things down.
Define metrics once. Agree on what "active customer" or "net revenue" means, and build it in one place.
Document the model. A short note on each table's grain, source and purpose saves hours later.
Reconcile regularly. Compare key totals with the source system after changes to the model or to the sync.
Avoid over-modeling. Build structure only when someone has a question that needs it.
FAQ
What is the difference between a join and a query table?
A join connects tables through related fields, which is quick and visual. A query table defines a new table using a SQL SELECT statement, which gives you more control over conditions, aggregation and reshaping.
Do I need to know SQL for Zoho Analytics data modeling?
No. Many models need only joins and formulas. SQL becomes useful for more complex logic and for building reusable reporting tables.
Why did my total go up after I joined two tables?
The most likely cause is a join between tables of different grain, or duplicate keys on one side. Check the row count, then check whether the key is unique in each table.
Should I put calculations in the model or in each report?
In the model, whenever the calculation will be reused. This keeps definitions consistent and means a rule change only needs to be made once.
Need help with Zoho Analytics data modeling?
Cee Apps is a Zoho services partner that helps teams get more from their Zoho data. If you would rather have specialists design your model, our Zoho Analytics services include:
Dashboard and report design: clear, decision-focused reporting built on a solid model.
Data modeling and SQL query tables: well-structured, reusable joins, formulas and query logic.
Data integration: connecting Zoho CRM, Zoho Books and third-party sources in one workspace.
Migrations from other BI tools: moving your existing reports and data models into Zoho Analytics.
Training and support: helping your analysts and power users build, maintain and extend their own models.
Ready to build a data model your team can trust?
Related articles
Zoho Books Reports in Zoho Analytics: Setup Guide
Learn how to connect Zoho Books to Zoho Analytics, check your data, and build finance reports and dashboards your team can trust.
How to Create SQL Queries in Zoho Analytics
Learn how to write SQL in Zoho Analytics using Query Tables: create, join and aggregate data, avoid common errors and build reusable reports.
Zoho CRM Analytics: How to Build a Sales Dashboard
Learn how to build a Zoho CRM sales dashboard: pick the right KPIs, connect Zoho Analytics, design pipeline reports and share them with your team.
Comments
No comments yet.