NAMEOF
A column's or a measure's full name as text: 'Table'[Name].
Group: Information. Compatible with DAX.
Syntax
NAMEOF ( <value> )
| Parameter | Type | Description |
|---|---|---|
value | Column or measure | A reference to a column or a measure of the model, or a measure the query defines. |
Returns
Text. The full name: the table's name in single quotes, then the column's or measure's in brackets.
Remarks
- A measure's name comes with its home table:
NAMEOF ( [Liters sold] )is 'Sales'[Liters sold]. - The table's name is always quoted, so the text can be used as it is in a formula; a closing bracket in a name is doubled, as a formula writes it.
- A table or a variable is not taken: give a column or a measure.
Compared with DAX
Newer DAX also takes a table or a calendar, and two more arguments: which part of the name to give (the table's, the column's, the whole) and how to quote it. OpenBI takes a column or a measure alone and always gives the whole name, quoted.
Examples
A column and a measure
EVALUATE
ROW (
"Column", NAMEOF ( Products[Price per liter] ),
"Measure", NAMEOF ( [Liters sold] )
)
| Column | Measure |
|---|---|
| 'Products'[Price per liter] | 'Sales'[Liters sold] |
A measure the query defines
DEFINE
MEASURE Products[Liters per product] = DIVIDE ( [Liters sold], COUNTROWS ( Products ) )
EVALUATE
ROW (
"Name", NAMEOF ( [Liters per product] ),
"Value", [Liters per product]
)
| Name | Value |
|---|---|
| 'Products'[Liters per product] | 451615.75 |
Related functions
SELECTEDMEASURENAME, ISSELECTEDMEASURE, FORMAT, CONCATENATE.