Star in, star out
Each model table should map to one gold table, with friendly names applied at the model boundary. For the "Sales & Inventory" model:
| Model table | Gold source | Role |
|---|---|---|
| Date | dim_date | Marked date table; plays order and ship date |
| Customer | dim_customer | Type 2; as-was region plus current region |
| Product | dim_product | Type 1; category drives Budget |
| Warehouse | dim_warehouse | Shared by Sales and Inventory |
| Salesperson | dim_salesperson | Also the natural RLS anchor |
| Sales | fact_sales | Order line grain; all columns hidden |
| Inventory | fact_inventory_daily | Daily snapshot; semi-additive |
| Budget | fact_budget | Month x category x region |
| Measures | none | Home for every measure |
If the model needs a Power Query step, a calculated column or a calculated table to make the star work, that is a sign the fix belongs upstream. In Direct Lake it is not even an option: Direct Lake tables have no Power Query, and calculated columns on them are not supported (check current documentation, as Direct Lake capabilities have been expanding).
Relationships and cardinality
The default is one-to-many, single direction, with the dimension filtering the fact. Departures from the default should each have a stated reason.
| From (one) | To (many) | Cardinality | Direction | Active |
|---|---|---|---|---|
| Date[Date Key] | Sales[Order Date Key] | 1 : * | Single | Yes |
| Date[Date Key] | Sales[Ship Date Key] | 1 : * | Single | No |
| Customer[Customer Key] | Sales[Customer Key] | 1 : * | Single | Yes |
| Product[Product Key] | Sales, Inventory | 1 : * | Single | Yes |
| Warehouse[Warehouse Key] | Sales, Inventory | 1 : * | Single | Yes |
| Salesperson[Salesperson Key] | Sales[Salesperson Key] | 1 : * | Single | Yes |
| Date[Date Key] | Inventory[Date Key] | 1 : * | Single | Yes |
| Product[Category] | Budget[Product Category] | * : * | Single (Product filters Budget) | Yes |
| Date[Year Month] | Budget[Year Month] | * : * | Single (Date filters Budget) | Yes |
| Customer[Region] | Budget[Region] | * : * | Single (Customer filters Budget) | Yes |
Many-to-many cardinality is acceptable for a fact at a coarser grain than its dimension, as with Budget. Keep it single direction so the dimension filters the fact and never the reverse.
Bidirectional filtering is acceptable in narrow cases: a dimension-to-bridge relationship in a true many-to-many pattern, or a small dimension that must show only members with data. Even then, prefer CROSSFILTER inside the specific measure that needs it, so the behavior does not leak into every query. Bidirectional relationships across a model create ambiguous filter paths, and the engine will deactivate relationships to resolve them, often in ways nobody intended.
If you are reaching for a bidirectional relationship to make a visual "work," check the grain first. The usual cause is a fact at a different grain than assumed or a missing conformed dimension.
Role-playing dates
fact_sales has two dates. There are two ways to model that:
| One Date table, inactive relationship | Separate Order Date and Ship Date tables | |
|---|---|---|
| Model size | One date table | Two (date tables are small, so this rarely matters) |
| User experience | One Date to slice by; ship-date views come from specific measures | Two clearly named tables to slice by |
| Slice by both roles at once | Not possible ("ordered in March, shipped in April") | Natural |
| Measure count | A ship-date variant per measure that needs one | No extra measures |
| Time intelligence | One marked date table | Each table must be marked and kept in sync |
Use the inactive relationship when the second role is needed in a handful of measures. Duplicate the table when users genuinely analyze by both roles or many measures need the second role.
Sales by Ship Date =
CALCULATE (
[Net Sales],
USERELATIONSHIP ( Sales[Ship Date Key], 'Date'[Date Key] )
)
In Direct Lake, check whether your model can map the same Delta table to two model tables. If it cannot, the alternatives are a physical copy of dim_date (cheap) or a view, which on the SQL endpoint triggers DirectQuery fallback and is unavailable on Direct Lake on OneLake.
Measures, folders and hidden keys
Every number a user sees should be an explicit measure. Implicit measures (dragging a numeric column and letting the visual sum it) cannot be governed, behave wrongly for semi-additive and non-additive columns, and are disabled once you add calculation groups. Set the model to discourage implicit measures and hide the underlying fact columns.
Net Sales = SUM ( Sales[Net Amount] )
Gross Sales = SUM ( Sales[Gross Amount] )
Discount = SUM ( Sales[Discount Amount] )
Units = SUM ( Sales[Quantity] )
Cost = SUM ( Sales[Cost Amount] )
Gross Margin = [Net Sales] - [Cost]
Margin % = DIVIDE ( [Gross Margin], [Net Sales] )
Net Sales PY = CALCULATE ( [Net Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
YoY % = DIVIDE ( [Net Sales] - [Net Sales PY], [Net Sales PY] )
Organize with a dedicated Measures table and display folders (Sales, Margin, Time Comparison, Inventory, Budget). Then hide everything a report author should not touch: every Key column, valid_from, valid_to, is_current, hash and audit columns, and raw fact columns. Set sort-by columns (Month Name by Month Number), data categories, and format strings on measures rather than in visuals. Write a description on every measure; Copilot and data agents read them.
Time intelligence and semi-additive measures
Mark Date as the date table, ensure it has one contiguous row per day covering full years, and turn off auto date/time so the model does not grow a hidden date table per date column. Standard functions such as SAMEPERIODLASTYEAR and DATESYTD then work against it. Calculation groups can replace the explosion of PY, YTD and YoY variants for every base measure; they cost some transparency (format strings and precedence need care), so introduce them once the base measure list is stable. Microsoft has also been previewing calendar-based time intelligence for week-based and retail calendars; treat it as worth evaluating rather than a default.
Inventory needs a closing balance, not a sum over days:
On Hand Units =
VAR LastDayWithData =
LASTNONBLANK ( 'Date'[Date], CALCULATE ( SUM ( Inventory[On Hand Qty] ) ) )
RETURN
CALCULATE ( SUM ( Inventory[On Hand Qty] ), LastDayWithData )
LASTNONBLANK avoids the classic LASTDATE bug, where the current month shows blank because its last calendar day has no snapshot yet. On very large snapshots, a variant that finds the maximum snapshot date once can be faster; measure before optimizing.
Aggregations, security and what belongs where
Aggregations. User-defined aggregation tables (an Import aggregate over a DirectQuery detail table) are a mature pattern for very large DirectQuery models. With Direct Lake on well-maintained Delta tables, the need is smaller; when you do need a pre-aggregated table, build it in gold as an agg_ table so it is tested like any other.
Row-level security. Define roles in the model, filtering dimension tables (Salesperson or Customer[Region]), never fact tables directly. Filtering the dimension lets the relationship do the work and keeps the rule in one place.
For Direct Lake on the SQL analytics endpoint, row-level or object-level security defined in the SQL endpoint or Warehouse forces queries to fall back to DirectQuery, because the semantic engine cannot apply SQL security when it reads Delta files directly. Keep RLS in the semantic model for Direct Lake. OneLake security is maturing as a storage-level alternative; check how your Direct Lake flavor honors it before relying on it.
| Logic | Warehouse or lakehouse | Semantic model (DAX) |
|---|---|---|
Row-level arithmetic (net_amount) | Yes | No |
| SCD history, surrogate keys, unknown members | Yes | No |
| Static bands and groupings (price band) | Yes, as a dimension column | Only if it depends on a user selection |
| Ratios (Margin %) | Store the components | Yes |
| Time comparisons (Net Sales PY, YoY %) | No | Yes |
| Currency conversion | Yes, when the rate is fixed per transaction | Yes, when the user picks the rate date or currency |
If it is computed per row and does not depend on filter context, push it upstream. If it depends on what the user selected, it is a measure.
As semantic link puts DAX measures in reach of notebooks and metrics layers appear in other tools, should measure definitions live only in the semantic model? See Open questions.
The Star schema explorer shows active and inactive relationships, and the Column lineage tracer follows a measure such as Margin % back to its source columns.