INFO.ANNOTATIONS DAX Function (Information)
Returns a list of all annotations in the current model with columns matching the schema rowset for annotation objects.
Syntax
| Parameter | Attributes | Description |
|---|---|---|
| RestrictionName | Optional Repeatable |
Restriction name. |
| RestrictionValue | Optional Repeatable |
Restriction value. |
Return values
A table with one row for each annotation in the model. The columns match the TMSCHEMA_ANNOTATIONS DMV.
| Field | Type |
|---|---|
| ID | Integer |
| ObjectID | Integer |
| ObjectType | Integer |
| Name | String |
| Value | String |
| ModifiedTime | DateTime |
Remarks
Corresponds to the TMSCHEMA_ANNOTATIONS data management view (DMV).
As all the INFO functions, it cannot be used in calculated tables and calculated columns.
Use this function in a DAX query. Without arguments, the function returns all the rows. To filter the rows, pass pairs of arguments: the name of a restriction and its value, both as text. If you use more than one pair, a row must match all of them. The number of arguments must be even, and an unknown restriction name returns an error. The restriction name is not case sensitive. The restriction name is the name of a column in the result. For example, INFO.ANNOTATIONS ( “ObjectType”, “4”, “Name”, “PBI_FormatHint” ) returns the format hints that Power BI stores for columns.
Each row is one annotation. ObjectType and ObjectID identify the object that owns the annotation. ObjectType is a number for the type of object, and 4 is a column. ObjectID is the ID of that object. To get the name of the object, join the result to the INFO function of that object type, for example INFO.COLUMNS and INFO.TABLES, as in the example. Name and Value contain the text of the annotation.
According to Microsoft documentation, only users with write permission on the semantic model can run this function, and it does not work in a live connection to a model in Power BI Desktop.
Examples
-- INFO.ANNOTATIONS lists the annotations of the model.
-- Query 1: how many annotations exist for each annotation name.
-- Query 2: the first five PBI_FormatHint annotations of columns (ObjectType 4), with the column name.
EVALUATE
GROUPBY (
INFO.ANNOTATIONS (),
[Name],
"Annotations", COUNTX ( CURRENTGROUP (), 1 )
)
ORDER BY [Annotations] DESC, [Name]
EVALUATE
VAR ColumnList =
SELECTCOLUMNS (
INFO.COLUMNS (),
"ObjectID", [ID],
"TableID", [TableID],
"Column", [ExplicitName]
)
VAR TableList =
SELECTCOLUMNS ( INFO.TABLES (), "TableID", [ID], "Table", [Name] )
VAR Result =
SELECTCOLUMNS (
NATURALINNERJOIN (
NATURALINNERJOIN (
INFO.ANNOTATIONS ( "ObjectType", "4", "Name", "PBI_FormatHint" ),
ColumnList
),
TableList
),
"Table", [Table],
"Column", [Column],
"Annotation", [Name],
"Value", [Value]
)
RETURN
TOPN ( 5, Result, [Table], ASC, [Column], ASC )
ORDER BY [Table], [Column]
| Name | Annotations |
|---|---|
| SummarizationSetBy | 118 |
| PBI_FormatHint | 38 |
| PBI_NavigationStepName | 10 |
| PBI_ResultType | 9 |
| UnderlyingDateTimeDataType | 3 |
| PBI_Id | 2 |
| __PBI_TimeIntelligenceEnabled | 1 |
| __TEdtr | 1 |
| PBI_QueryOrder | 1 |
| Table | Column | Annotation | Value |
|---|---|---|---|
| Customer | Birth Date | PBI_FormatHint | {“isDateTimeCustom”:true} |
| Customer | Cars Owned | PBI_FormatHint | {“isGeneralNumber”:true} |
| Customer | Children At Home | PBI_FormatHint | {“isGeneralNumber”:true} |
| Customer | CustomerKey | PBI_FormatHint | {“isGeneralNumber”:true} |
| Customer | Date First Purchase | PBI_FormatHint | {“isDateTimeCustom”:true} |
Last update: Nov 27, 2026 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://learn.microsoft.com/en-us/dax/info-annotations-function-dax