User-Defined Attributes
What a user-defined attribute is
A user-defined attribute (UDA) is a new column you compute from the columns a table already has, without changing the source database. You write a small expression — for example, join a region code and a branch code into one label, or turn a raw amount into a rounded figure — and Tessallite stores that expression on the model. From then on the computed value behaves like any other column on that table: you can build a dimension or a measure on top of it.
Think of it as a spreadsheet formula column that lives inside the model instead of inside one analyst's workbook. Define it once, and every dimension, measure, KPI, and BI tool that uses it reads the same definition.
Where UDAs live (this trips people up)
UDAs are not in the left Toolbelt next to Measures and Dimensions. You author them on the table itself:
- On the canvas, click a table node, or find the table in the Sources panel.
- Click the Edit (pencil) button to open the table editor.
- Open the Attributes tab.
The Attributes tab lists every column on the table and marks each one as physical (it exists in the source) or computed (a UDA you added). This is the only place UDAs are created and edited.
UDA vs calculated measure vs plain column
Pick the right tool so the model stays simple:
| You want… | Use | Why |
|---|---|---|
| A value that lives in a source column | A plain column / plain measure | Nothing to compute |
| A new value computed row by row from other columns on the same table | A user-defined attribute | The result is a column; you can group or aggregate by it |
| A number derived from other measures (e.g. gross-margin % from two measures) | A calculated measure | The result is an aggregate, not a row-level column |
| The same measure shifted across time (YTD, prior year) | A time variant | Time intelligence, generated per query |
The rule of thumb: if the value makes sense on a single row before any grouping, it is a UDA. If it only makes sense after aggregation, it is a calculated measure.
Before you start
- The table must already have its physical columns synced from the source. A UDA references those columns, so if the table has none yet, sync from the source first (the Attributes tab tells you when this is the case).
- Decide whether the result is text, a number, or a date — you will set an output type.
Step-by-step: add a user-defined attribute
- Open the table editor and go to the Attributes tab (see above).
- In Add computed attribute, enter a Name. Use a business-readable, lowercase identifier — for example
region_branch— because BI tools surface this name to end users. - Enter the Expression. It is a row-level formula over the table's physical columns, for example:
CONCAT(region_code, '-', branch_code). Use the Function picker and Insert to drop a supported function into the expression if you are unsure of the exact name. Date parts work the way the date hierarchy writes them, for exampleEXTRACT(YEAR FROM business_date), andCASE WHEN ... THEN ... ELSE ... ENDis available too. Byte literals such asb'abc'are not supported; useCAST('...' AS BINARY)or a hex function of the source. The expression can also use another computed attribute of the same table by its name, for examplebusiness_date_year * 100 + business_date_month. Tessallite puts that attribute's own formula in its place, so a later change to it carries through. A name that is also a physical column means the physical column, and an attribute cannot use itself, directly or through others. - Set the Output type (for example text, number, or date) to match what the expression returns.
- Optionally add a Description. It is copied to the dimension or measure you build on the attribute, so it reaches the assistant and BI tools. Changing it later updates that dimension or measure too, unless you wrote a description of its own there.
- Click Validate. Tessallite checks the expression against the real source and returns Validation passed or a specific error. Fix any error before saving — an invalid UDA is a wrong-numbers risk downstream.
- In Use as, choose how the attribute is used: Dimension (the default), Date key, Measure, or Classify later. This is the same step as the Classification tab, done for you.
- Click Add. The new attribute appears in the list marked computed, with its dimension or measure ready to use.
Use a UDA as a dimension or a measure
A UDA is only a column definition — on its own it does not appear in queries. Use as on the Attributes tab (step 7 above) does this for you when you add it. To classify an existing attribute, or change its use, open the Classification tab, or:
- Build a dimension on it (in the Dimensions area) to group or filter by the computed value.
- Build a measure on it (in the Measures area) to aggregate the computed value.
Both pick the UDA from the same table column list a physical column would appear in.
Security: a UDA follows the columns it reads
A UDA is computed over the persona's model, which holds only the columns that column security leaves. If a column it reads carries a tag the persona is restricted from, the UDA cannot be computed for that persona: it is left out of the persona's field lists, and a query that names it is refused like a field that does not exist. If salary is tagged and restricted for a persona, a UDA such as salary_band built from salary is not available to that persona.
Data tags apply only to physical columns, so a UDA itself cannot be tagged. To keep a persona from seeing a UDA that reads only untagged columns, leave the dimensions and measures built on it out of that persona's allow-list (see Configure Personas). See Column-Level Security.
Tips and pitfalls
- Row-level only. A UDA is evaluated per row before grouping. It cannot reference a measure or an aggregate; that is what a calculated measure is for.
- Validate before you trust it. The Validate button runs the expression against the source. A UDA that saves but was never validated can silently produce wrong values.
- Removing a UDA invalidates its dependents. If a dimension or measure references the attribute, deleting the attribute makes them invalid. Repoint or remove those first. An attribute that another attribute uses cannot be deleted or renamed until you change the one that uses it.
- Summary tables use the deployed model. A summary table (aggregate) on a new attribute is built once you save and deploy the model.
- Hierarchy-generated attributes are read-only. Some computed attributes are created automatically by a date hierarchy. Their expression is managed for you — you can rename them, change the description, or adjust the output type, but you cannot edit the formula here.
- Names reach end users. The attribute name flows through to Excel, JDBC, and XMLA, so keep it stable and business-readable.
Related
See the supported-function reference for complete lists, worked examples and the rules for each expression type.
The channel comparison explains how to publish an attribute-backed dimension for JDBC, native Excel/XMLA and Agent use, even when a client cannot write the attribute's formula directly.
- Define Measures — aggregate a column or a UDA
- Calculated Measures — derive a number from other measures
- Define Dimensions — group and filter by a column or a UDA
- Add Tables to a Model — the table editor these live in
- Business Glossary — where UDA descriptions surface
- Column-Level Security — why a UDA needs its own restriction