NAMEOF DAX Function (Information) Volatile

Returns the name of a table, column, measure, or calendar as a text string. Optional parameters control which component of the name is returned and how the result is escaped.

Syntax

NAMEOF ( <Value> [, <Component>] [, <Escaped>] )
Parameter Attributes Description
Value

The component parameter accepts the following values:

Value Description
TABLE Returns the table name. Returns an error if the object is not associated with a table (e.g., a calendar).
COLUMN Returns the column name. Returns an error if the object is not a column.
MEASURE Returns the measure name. Returns an error if the object is not a measure.
CALENDAR Returns the calendar name. Returns an error if the object is not a calendar.
FULL (Default) Returns the fully qualified name of the object.
SELF Returns the name of the object itself: the column or measure name for columns and measures, or the table/calendar name for tables and calendars.
PARENT Returns the parent table name for columns and measures. Returns an error for tables and calendars.
Component Optional

The escaped parameter accepts the following values:

Value Description
ESCAPED (Default) Returns the name with full DAX escaping: table names wrapped in single quotes, column and measure names wrapped in square brackets.
UNESCAPED Returns the raw name without any delimiters or escape characters. Returns an error for fully qualified names that contain both a parent and child component.
MINIMALLYESCAPED Returns the name with escaping applied only when the name requires it. Names that contain only simple letters, digits, and underscores are returned without delimiters. Names that contain spaces or special characters are returned with escaping.
Escaped Optional

Optional. An enumeration indicating the format of the name to be returned.

Return values

Scalar A single string value.

A text string with the requested name, formatted based on the component and escaped parameters.

Remarks

  • When called with only the object argument, NAMEOF behaves the same as in previous versions, returning a fully qualified, escaped name. Because component defaults to FULL and escaped defaults to ESCAPED, the return formats are:
    • For tables: 'TableName'.
    • For columns: 'TableName'[ColumnName].
    • For measures: 'TableName'[MeasureName].
    • For calendars: 'CalendarName'.
    • For variation columns: 'TableName'[ColumnName].[VariationName].
  • Variables and dynamic expressions are not supported as arguments to NAMEOF.
  • This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.
» 3 related articles
» 1 related function

Examples

EVALUATE
{
    NAMEOF ( Sales[Sales Amount] ),   // Measure reference
    NAMEOF ( [Sales Amount] ),        // Measure reference
    NAMEOF ( Customer[Birth Date] )   // Column reference
}

Value
‘Sales'[Sales Amount]
‘Sales'[Sales Amount]
‘Customer'[Birth Date]

Related articles

Learn more about NAMEOF in the following articles:

Related functions

Other related functions are:

Last update: Apr 21, 2026   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber,

Microsoft documentation: https://learn.microsoft.com/dax/nameof-function-dax

2018-2026 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Passed by Expression

This parameter is passed by expression and can be evaluated multiple times in different evaluation contexts.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of NAMEOF? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.


This site is protected by reCAPTCHA.