Fact Groups and Drill-Across
What this covers
A model can hold more than one fact table — for example payments and budget. This article explains how to tell Tessallite which facts may be queried together (fact groups), how one question can still use measures from different groups (drill-across on conformed dimensions), and what the Assistant checks before a deploy.
Why fact groups exist
Joining two fact tables directly multiplies rows: every payment is repeated once per budget line of its region, and every total comes out too large. It is the most common way analytics tools give wrong numbers without any warning.
A fact group says which facts and dimension tables belong together. A query is answered inside one group, so facts that were never meant to be joined are never joined.
Choose a group without changing the model
The Fact group dropdown beside Persona selects a working query/authoring constraint; it does not edit the assignments described below. The existing query owner applies persona requirements, row security and default filters first, then requires the requested group to cover the query. It refuses uncovered or conflicting requests rather than choosing a broader group.
Shared dimensions remain usable in each group where their declared bindings and the existing owner permit them. Choosing Automatic preserves supported automatic or composed behavior. For a composite measure, select foreign models independently: a working choice cannot rewrite an operand's published group. See working selections on the canvas.
Define fact groups
- Open the model in the Model Builder and choose Fact Groups in the left panel.
- Click Add fact group, give it a Name, and tick the Assigned tables: the fact (or facts that are joined to each other) and the dimension tables reached from them.
- Save. Every fact table must belong to exactly one group. To use the same fact in two groups, create a table alias of it and put the alias in the second group.
Imported models (dbt, Cube, AtScale) start with the groups the Assistant suggests; change them like any group you created.
Changing a group that a composite measure uses
A composite measure (a shared calculation) names the fact groups its operands come from. While one refers to a group, in this model or in another model of the project, Tessallite protects what the calculation is computed from:
| Change to the group | Allowed while a composite measure refers to it |
|---|---|
| Add a table that is not a fact table: a lookup table, or a calendar table joined from the fact | Yes. The group's fact rows and the calculation's operands are unchanged. |
| Take out a table that is not a fact table | Yes, after you confirm a warning. A composite measure, or a shared calculation that is not a composite measure, built from a measure on that table becomes invalid. See "Taking a lookup table out of a group" below. |
| Add another fact table | No. It changes the rows the group stands for. |
| Take a fact table out of the group | No. It changes the rows the group stands for. |
| Delete the group | No. |
A refused change says which calculation refers to the group ("a shared calculation still references ..."). Change or remove that composite measure first, make the change, then create it again.
A worked example: a fiscal calendar. A model has the fact group Payments and another model has a composite measure that uses it. You want fiscal years and fiscal quarters on the business date.
- Add the fiscal calendar table to the model and join the fact to it on the business date (many payments to one calendar day).
- Open Fact Groups, edit Payments and tick the calendar table under Assigned tables. This is accepted although the composite measure refers to the group.
- Create a hierarchy on the calendar table's own columns (fiscal year, fiscal quarter, month), give each level its time unit, and publish the levels as dimensions.
- Save and deploy. A prior-year measure grouped by the fiscal year now compares fiscal years.
Until step 2 is done the calendar's fields are marked invalid ("Source table ... is no longer reachable from the declared fact population") and the model cannot be deployed: a table joined to the fact is not part of the group until it is assigned to it.
A dimension alias is for a different need. Use a dimension alias when the same table is reached by a second join with another meaning (order date and ship date both on one calendar table). An alias of a table that is already in the group needs no change to the group. A table that is not in the group yet, such as a new calendar table, has to be assigned as above.
Taking a lookup table out of a group
The idea. A fact group says which tables a set of measures is computed from. A composite measure is built from other measures, and each of those must sit on a table of its group. If you take a lookup table out of the group, a measure on that table is no longer part of the group, so a composite measure built from it can no longer be computed. Tessallite does not stop you. It tells you what will break, asks you to confirm, and then marks exactly those measures invalid so that you can see and repair them.
What you see.
- Open Fact Groups, edit the group, untick the table under Assigned tables and click Save.
- If no composite measure or other shared calculation is built from a measure on that table, the change is saved at once.
- Otherwise a confirmation appears. It names each composite measure that will become invalid, and the model each one belongs to (a composite measure can live in another model of the project). It also names each shared calculation that is not a composite measure and will become invalid. Click Cancel and nothing is changed. Click Remove the table to go ahead.
- After you confirm, each named composite measure is marked invalid. Model Health of its model lists it under Shared calculations and composite measures with the reason and the way to repair it. A shared calculation that is not a composite measure is listed there in every model it is computed from. The fields on the removed table are marked invalid as well, as for any table that is not part of a group.
What invalid means here. An invalid measure is never published. A model that holds an invalid composite measure cannot be saved as a new version: the refusal names the measure and repeats the way to repair it. The same holds for a shared calculation that is not a composite measure: no model it is computed from can be saved as a new version while it is invalid. A version that holds any invalid object cannot be deployed either. The version that is already deployed is not touched, so reports keep the answers they had. Nothing a user queries changes until you deploy again, and you can only deploy once the model is valid.
How to repair it. Either of these makes the composite measure valid again:
- Add the table back to the fact group. The composite measure becomes valid again by itself, with no other action.
- Edit the composite measure so that it no longer uses the measure on that table.
What is not affected. Only composite measures built from a measure on the removed table are named and marked. Composite measures built only from measures on other tables, plain measures, and every report on the deployed version are unchanged.
When to do this. Use it when a lookup table was assigned to the group by mistake, or when you are reorganising a model and will repair or replace the composite measure in the same piece of work. If you only want to stop showing a table's fields, hide the fields instead: that changes nothing about validity.
Pitfalls.
- A shared calculation that is not a composite measure (one with no measure of its own in a model) has no place in Model Health to carry the fault, so for it the removal is still refused. Change or remove that calculation first.
- Confirming does not deploy anything. Plan the repair before you confirm, because the models named in the warning cannot be deployed until it is done.
A worked example. The model Sales has the fact group Orders with the fact table and a Product lookup table. The measure Weight is on the Product table. In the model Logistics, the composite measure Units plus weight adds Units to Weight.
- In Sales, edit Orders and untick Product. The confirmation says: taking 'Product' out of fact group 'Orders' leaves these composite measures without a measure they are built from: 'Units plus weight' (model 'Logistics').
- Confirm. Units plus weight is now listed in the Model Health of Logistics as invalid, with the instruction to add the table back or change the measure. Logistics cannot be deployed until then; its deployed version still answers as before.
- Tick Product again in Orders and save. Units plus weight is valid again.
The Assistant
The Assistant list in the Fact Groups panel checks the groups against the joins and offers fixes. Nothing is applied until you click Apply.
An option can need several changes (for example a new table alias, a new join, removing the old join and updating the group). Apply saves all of them together or none of them. If one change is refused, the Assistant shows which step failed, the objects it concerned and the reason, and the model is left exactly as it was.
| Item | What it means | Blocks deploy |
|---|---|---|
| Suggested groups | Facts linked by joins, with the dimensions they reach | No |
| Group not connected | Two facts in one group with no join between them | Yes |
| Several paths | A fact reaches a table by more than one route (for example two joins on different keys) | Yes, until the routes are proven to give the same answer or you choose one. The proof checks that every fact row reaches the same member through both routes, so the fact needs a declared key; without one, choose a route |
| Table outside the group | A table reached from the group but not assigned to it | No; queries that use it are refused |
Preview runs the same measure through both routes so you can see whether they agree. When two joins lead to the same table on different keys, each is a different business meaning (for example order date and ship date): give each its own dimension alias.
Model Health shows the number of open items under Fact groups and join paths. Deploy refuses a model while a blocking item is open.
Drill-across: measures from different groups
A question may ask for measures from two groups, such as payments and budget by region. Tessallite answers it by drill-across: it runs one governed query per group and lines the results up on a dimension both groups share. The facts are never joined.
If both groups include the same dimension table, you can group and filter by its ordinary fields, using their names in the field list. For example, region_name on a Region table included in both groups can be used as region_name. A field that belongs to one group only cannot line up the other group's figures.
If the groups use different fields for the same thing, declare a conformed dimension with one name for those fields:
- In the Model Builder, open Conformed dimensions from the Data Model toolbelt group (or use
?panel=conformed-dimensions); click Add conformed dimension. - Give it a name (for example region) and add one binding per fact group: the dimension of that group that holds the shared values.
- Save and deploy.
Mapping suggestions compare a bounded sample of each candidate’s distinct keys with the reference’s full key domain. The percentage is the share of sampled candidate keys found there, not a comparison of two truncated ranges. A source failure is shown as unmeasured rather than zero overlap. Suggestions do not change a binding until you choose and save it.
A conformed dimension belongs to the model it was declared in. Its name is unique per owning model, so two models can each own a region; the field list of another model shows it as model.region (project.model.object). A model can use one conformed dimension per name. When you copy a model, the copy gets its own copy of every conformed dimension the original owns, with the same name, and stays linked to the ones other models own. Restoring a saved version keeps the model's own conformed dimensions. If the owning model is deleted, its conformed dimensions stay and the other models keep using them.
Now SELECT region, SUM(payment_amount), SUM(budget_amount) … GROUP BY region returns one row per region, with each total computed on its own fact. A region with payments but no budget shows an empty budget, not a wrong number.
Results can be ordered by a dimension or by an output name (ORDER BY payments). With no dimension at all (SELECT SUM(payment_amount), SUM(budget_amount) FROM budget_vs_actual, a pivot's grand-total row) each group returns its own total and the totals come back as one row. Totals need no shared dimension or conformed declaration.
In SQL, read a calculated composite measure with SUM(variance). Other aggregates around that calculated result, such as COUNT(variance) or AVG(variance), are refused. A native average requested alongside a composite calculation keeps its own aggregation. Select grouping dimensions as plain columns, optionally with an alias; expressions such as year + 1 are refused in a combined query.
You can list shared grouping keys in either order; returned columns and labels follow your SELECT list. NULLS FIRST and NULLS LAST preserve the requested order, including when an answer is reused. LIMIT and OFFSET apply after the results are combined: a positive limit permits the one-row grand total, while LIMIT 0 or an offset past that row returns no rows.