NAMEOF -function to get name of column (DAX – Power Pivot, Power BI)
The NAMEOF functions generates the name of column.
For example here:
- ColumnName = NAMEOF(Regions[Country])
The question is obvious - if the input is exactly the same as output, why the hell do we need the function?
Imagine you refer the column with text string like this:
Yes, it works... But!
When the name or original column is changed, then the formula is broken. In contrary, when using NAMEOF, then the column name change automatically changes the output of function and nothing wrong happens.