Tabular Column
The Columns section lists the columns that belong to the table in the model. Each entry either maps to a source column in the gold table, or is a calculated column defined by a DAX Expression.
Dax Column
| Name | Description |
|---|---|
| SourceColumn | Sourcecolumn name, if name is not supplied, this name is used. Automatically camelcase script is applied. Mutually exclusive with Expression. |
| Expression | DAX expression that defines this column as a calculated column. Mutually exclusive with SourceColumn. |
| DataType | Datatype of the column. Will be converted to Fabric datatype. |
| Classification | Classification of this field. Set to sensitive for fields that should be handled with care. |
| SensitiveDomain | Sensitive domain of a column of a Dim table; the column moves to the hidden, private companion table {Name}_{SensitiveDomain}. See SensitiveDomain |
| DataCategory | Data category of the column |
| Description | Description of the field, used in BI-tools like Power BI and Excel |
| DisplayFolder | Folder for this field, used in BI-tools like Power BI and Excel |
| FormatString | Format string of this field |
| SummarizeBy | Default aggregation a BI tool applies when this column is dropped into a visual: none, default, sum, min, max, count, average or distinctcount. Defaults to none so numeric keys and year columns are not summed automatically. |
| IsHidden | Field is hidden from the model (can still be queried) (default=false) |
| IsKey/IsPrimaryKey | Field is used as the primary key for this table (default=false) |
| IsUnique | Field contains unique values (default=false) |
| IsNullable | Set to false to declare the column as not nullable (default=true) |
| Alignment | Horizontal alignment of the column values in report visuals: default, left, right or center (default=default) |
| IsAvailableInMdx | Set to false when the column is not used for slicing and filtering in MDX clients (default=true) |
| EncodingHint | Storage encoding hint: Default, Value or Hash (default=Default) |
| OrderByColumn | The field on which this field should order. |
Basic: SourceColumn and Type
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: CallGrouping
Type: varchar(50)
- SourceColumn: PhoneStatus
Type: varchar(50)
- SourceColumn: IsActive
Type: bit
- SourceColumn: This is the name of the column in the source data.
- Type: Indicates the data type of the column. This defines how the data is stored and processed within the model. For a comprehensive list of data types, visit all data types.
Common Column Example
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: CallGrouping
Type: varchar(50)
Description: Represents the grouping of calls.
- SourceColumn: PhoneStatus
Type: varchar(50)
- SourceColumn: IsActive
Type: bit
IsHidden: true
Classification
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: CallGrouping
Type: varchar(50)
Classification: Sensitive
- SourceColumn: PhoneStatus
Type: varchar(50)
- SourceColumn: IsActive
Type: bit
- Classification: This field designates whether the data is classified as sensitive and should be handled with care.
SensitiveDomain
SensitiveDomain replaces the column in its main table with a user-aware calculated column (ExpressionContext: UserContext), a Power BI preview feature. It needs CompatibilityLevel: 1705, a preview-enabled capacity and the deploy assemblies 19.114.8 or newer. Use it to try the shape of your model, not in production.
- Table:
Name: Customer
SourceTable: D_Customer
TableType: Dim
Columns:
- SourceColumn: CustomerNumber
Type: varchar(50)
- SourceColumn: BirthDate
Type: date
SensitiveDomain: Private
- SourceColumn: Diagnosis
Type: varchar(255)
SensitiveDomain: Medical
- SensitiveDomain: Names the sensitive domain of the column and moves it out of its table into a companion table named
{Name}_{SensitiveDomain}; the example yieldsCustomer_PrivatewithBirthDateandCustomer_MedicalwithDiagnosis. Columns with the same domain share one companion table, so a table gets one companion table per distinct domain, and the same domain on another table gives that table its own companion table, e.g.Employee_Medical. The value is a name, not a switch: letters, digits and underscores only. The build log lists the companion tables created per table, so a typo in a value shows up there as an extra table.
Each companion table:
- holds the key column of the table (
SK_Customer) and the columns with itsSensitiveDomainvalue, in that order; - is
IsHiddenandIsPrivate, so it does not appear in the field list or model view of a client tool; - has the description of its main table followed by its
SensitiveDomainvalue, e.g.Customer details. (Private); - reads the same gold table as its main table, with a partition query of its own. There is no second gold table and no change to the gold load;
- is refreshed together with its main table by
DAG_Tabular. It is not listed inmodel.yaml, and needs no entry there; - marks each sensitive column with the annotation
EF_Sensitive, itsSensitiveDomainvalue as value, for tools that inspect the model. The key column carries none.
The flagged column is no longer loaded into the main table: the main table's partition query leaves it out. In its place the main table gets a calculated column with the same name, type, display folder and description, evaluated per user at query time:
LOOKUPVALUE ( 'Customer_Private'[BirthDate], 'Customer_Private'[SK_Customer], 'Customer'[SK_Customer] )
ExpressionContext: UserContext, so the value is looked up under the identity of the user who runs the query. A role that may not read the companion table sees a blank; a role that may sees the value. As aStandardcolumn it would be computed once at refresh and show the real values to everyone, so it is never one;SummarizeBy: none;- Group By Columns set to the key column (
SK_Customer), so a report can filter and slice on it: a user-aware column cannot be filtered or selected directly; - the annotation
EF_Sensitivewith the same value as its companion column, so tools that inspect the model treat it as sensitive too.
Reports and visuals that used the column keep working under the same name.
Which roles may read a companion table is set per domain with SensitiveDomains in roles.yaml: a role that lists Medical reads every *_Medical companion table, every other role gets FALSE() on them, and every domain must be listed by at least one role.
The key used to be called Sensitive. A column that still sets Sensitive fails generation with a message that names SensitiveDomain.
Generation fails when SensitiveDomain is:
trueorfalse: give a name instead, e.g.SensitiveDomain: Private;- empty;
- not a valid table-name suffix (anything but letters, digits and underscores);
and when it is set:
- on a
Fact,HelporCalculationGrouptable:SensitiveDomainapplies toDimtables only; - on a table with
Partitions: the companion table reads one gold table; - on a table whose key column is
DbOnly: the companion table needs the key; - on the key column itself, or on a calculated column (
Expression); - on a column without
Type: the lookup column needs an explicit data type; - in a model below
CompatibilityLevel: 1705, the level user-aware columns need; - while another table, or another companion table, already has the companion table's name: rename that table or give
SensitiveDomainanother name.
A calculated column that reads a column with a SensitiveDomain also fails generation, unless it has ExpressionContext: UserContext.
A measure that reads a column with a SensitiveDomain fails generation too; the column moves to its companion table.
Description
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: CallGrouping
Type: varchar(50)
Description: Represents the grouping of calls.
- SourceColumn: PhoneStatus
Type: varchar(50)
- SourceColumn: IsActive
Type: bit
- Description: The Description field provides an explanation of the column. In Power BI, this description will be shown as a tooltip when hovering over the column.
DisplayFolder
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: CallGrouping
Type: varchar(50)
DisplayFolder: Calls
- SourceColumn: PhoneStatus
Type: varchar(50)
- SourceColumn: IsActive
Type: bit
- DisplayFolder: The DisplayFolder allows you to organize your columns into folders within Power BI. By organizing columns into folders, you can better structure your tables, making it easier to find specific columns, especially when dealing with large tables.
FormatString
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: CallGrouping
Type: varchar(50)
- SourceColumn: CallOrder
Type: int
FormatString: 0
- SourceColumn: PhoneStatus
Type: varchar(50)
- SourceColumn: IsActive
Type: bit
- FormatString: The FormatString property defines the display format for the column result. In this example, "0" rounds numbers to the nearest integer without decimals.
SummarizeBy
- Table:
Name: Sales
SourceTable: F_Sales
TableType: Fact
Columns:
- SourceColumn: Year
Type: int
SummarizeBy: none
- SourceColumn: Amount
Type: decimal(21,5)
SummarizeBy: sum
- SummarizeBy: Sets the default aggregation Power BI applies when the column is dropped onto a visual. Valid values are
none,sum,average,count,min,maxanddistinctCount. The default isnone, which is important for numeric key columns and year columns: without it Power BI would sum them automatically. Use it to force a sensible default aggregation, though a dedicated measure is generally preferable.
IsHidden
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: CallGrouping
Type: varchar(50)
- SourceColumn: PhoneStatus
Type: varchar(50)
- SourceColumn: IsActive
Type: bit
IsHidden: true
- IsHidden: The IsHidden property controls the visibility of the column in Power BI or Excel. Setting it to true hides the column from the interface. By default, this property is set to false.
IsKey
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: id
Type: int
IsKey: true
- SourceColumn: CallGrouping
Type: varchar(50)
- SourceColumn: PhoneStatus
Type: varchar(50)
- SourceColumn: IsActive
Type: bit
- IsKey: Determines if this column is the primary key of the table. The default setting is false. When set to true, the column is recognized as a primary key.
IsUnique
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: id
Type: int
IsUnique: true
- SourceColumn: CallGrouping
Type: varchar(50)
- SourceColumn: PhoneStatus
Type: varchar(50)
- SourceColumn: IsActive
Type: bit
- IsUnique: Ensures that each entry in the column is unique. The default setting is false. If set to true and duplicate values are found, an error will occur, as this property requires all values to be distinct to maintain data integrity in the model.
IsNullable
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: id
Type: int
IsKey: true
IsNullable: false
- SourceColumn: CallGrouping
Type: varchar(50)
- IsNullable: Declares whether the column may contain null values. The default is true. Set it to false to enforce data integrity for columns that must always be populated, such as key columns.
Alignment
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: CallGrouping
Type: varchar(50)
Alignment: left
- SourceColumn: CallOrder
Type: int
Alignment: right
- Alignment: Controls the horizontal alignment of the column values in report visuals. Valid values are
default,left,rightandcenter. The default isdefault, which lets the client decide based on the data type.
IsAvailableInMdx
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: CallGrouping
Type: varchar(50)
- SourceColumn: HighCardinalityCode
Type: varchar(255)
IsAvailableInMdx: false
- IsAvailableInMdx: Set to false for large, high-cardinality columns that are not used as an attribute for slicing and filtering in MDX clients (such as Excel PivotTables). Disabling MDX availability produces a smaller, faster model. The default is true. A column referenced as an
OrderByColumncannot have this disabled.
EncodingHint
- Table:
Name: Sales
SourceTable: F_Sales
TableType: Fact
Columns:
- SourceColumn: Amount
Type: decimal(21,5)
EncodingHint: Value
- SourceColumn: Category
Type: varchar(50)
EncodingHint: Hash
- EncodingHint: A storage encoding hint for the VertiPaq engine. Valid values are
Default,ValueandHash.Valueencoding suits columns aggregated arithmetically (numeric measures);Hashencoding suits columns used for grouping and filtering. The default isDefault, which lets the engine choose.
SummarizeBy
- Table:
Name: Sales
SourceTable: F_Sales
TableType: Fact
Columns:
- SourceColumn: Year
Type: int
- SourceColumn: Amount
Type: decimal(21,5)
SummarizeBy: sum
-
SummarizeBy: Sets the default aggregation a BI tool applies when the column is dropped into a visual. Accepts
none,default,sum,min,max,count,averageordistinctcount.The default is
none, which is deliberate: without it Power BI auto-sums every numeric column, so identity-like numeric fields (surrogate keys,Year, postal codes) would silently be added up. Leave those onnoneand setSummarizeByexplicitly only on columns where a default aggregation is genuinely useful. For real, reusable calculations prefer a measure over relying on a column's default aggregation.
Expression (calculated column)
A column can be defined entirely in DAX instead of mapping to a gold-table column. Provide a Name, an Expression and a Type; leave SourceColumn unset. The framework emits a TOM calculated column, so the value is computed in the semantic modelThe "brain" of your data that tells Power BI how different pieces of information relate to each other. at refresh time rather than persisted to the gold table.
- Table:
Name: Sales
SourceTable: F_Sales
TableType: Fact
Columns:
- SourceColumn: Quantity
Type: decimal(21,5)
IsHidden: true
- SourceColumn: UnitPrice
Type: decimal(21,5)
IsHidden: true
- Name: LineAmount
Expression: Sales[Quantity] * Sales[UnitPrice]
Type: decimal(21,5)
FormatString: "#,##0.00"
DisplayFolder: Calculations
A column must have exactly one of SourceColumn or Expression; supplying both — or neither, with no Name — fails validation.
User-context columns (USERPRINCIPALNAME, CUSTOMDATA, …)
By default the framework emits a Standard calculated column, which Power BI materializes at refresh time. That has a consequence that is easy to get wrong: a DAX expression such as [Email] = USERPRINCIPALNAME() is evaluated once, under the refresh identity, and the result is stored. Every user then reads the same materialized value — the column is not user-aware.
For true per-user evaluation, set ExpressionContext: UserContext on the calculated column. That mode is unmaterialized: the expression is evaluated at query time, per user, in an empty filter context, under the RLS roles of the querying user, and the result is not stored. It unlocks the user functions USERCULTURE(), USERPRINCIPALNAME(), USEROBJECTID(), USERNAME() and CUSTOMDATA().
- Name: Reden uit dienst (afgeschermd)
Expression: LOOKUPVALUE( model_security[reden], model_security[key], 'Medewerker Contract'[key] )
ExpressionContext: UserContext
Type: varchar(255)
ExpressionContext accepts Standard (the default) or UserContext. A UserContext column has requirements the framework enforces at generation time — it must be a calculated column (Expression, not SourceColumn), needs an explicit Type, must be SummarizeBy: none, and may not participate in relationships, RLS, calculated tables or ordinary calculated columns.
ExpressionContext: UserContext is a Power BI preview feature that requires compatibility level 1705 or higher on a preview-enabled capacity. Generation fails with an explicit error if you use it while CompatibilityLevel is below 1705 — set CompatibilityLevel: 1705 in the model settings. An unrecognised ExpressionContext value is likewise rejected at build time rather than silently ignored.
Deploy assemblies
The tabular deploy reads and writes the model with the Analysis Services assemblies in Yml/scripts/Fabric/assemblies. A UserContext column, and so every SensitiveDomain, needs version 19.114.8 or newer of that set; older assemblies cannot carry the column to the model.
The Generator checks this on every build. It reads the product version of Microsoft.AnalysisServices.Tabular.dll in that folder and sends it with the model request:
- The model has a
UserContextorSensitiveDomaincolumn and the assemblies are older, or the DLL is not in the folder: the model step fails, naming the version it found and the folder it looked in. - The model has neither and the assemblies are older: the build passes with a warning.
To update, copy the Yml/scripts/Fabric/assemblies folder from the latest platform release zip over your own. The Generator never changes files in Yml itself. When your deploy loads its assemblies from another folder, point deployAssembliesFolder at it.
Because a user-context column keeps row context, its expression can combine [AnotherColumn] from the same row with the user functions — but only for columns that actually exist in the model. You cannot read or mask a value that was never loaded. A per-user display transform, for example, would look like:
Display Name =
VAR Lvl = LOOKUPVALUE( Access[Level], Access[Upn], USERPRINCIPALNAME() )
RETURN
SWITCH( TRUE(),
Lvl = "Full", [Name],
LEFT([Name],2) & "*****" & RIGHT([Name],2)
)
There is no DAX function that returns the active RLS/OLS role; you branch on identity instead (USERPRINCIPALNAME() mapped through a lookup table, or a CUSTOMDATA() token).
A calculated column that masks a value must first read the real value, so the plaintext is present in the model. OLS does not help: the column evaluates under the user's roles, so hiding [Name] with OLS also stops the calculated column from reading it — no masking. RLS returns BLANK (it hides whole rows, it does not mask characters). A hidden source column is still queryable through Analyze in Excel or a DAX EVALUATE. For genuine PII protection, mask upstream (in the warehouse / Gold layer, e.g. a ready-made Name_Masked column) and protect the full [Name] with RLS or simply do not load it into the model. In line with our PII rules, only present a user-context masking column alongside RLS/upstream protection — never as anonymization on its own.
OrderByColumn
- Table:
Name: CallStatus
SourceTable: D_CallStatus
TableType: Dim
Columns:
- SourceColumn: CallGrouping
Type: varchar(50)
- SourceColumn: PhoneStatus
Type: varchar(50)
OrderByColumn: Call Grouping
- SourceColumn: IsActive
Type: bit
OrderByColumn: Call Grouping
- OrderByColumn: Identifies the column used for sorting data within the table.