Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
Calculated column
Calculated table
Measure
Visual calculation
DAX query
Returns a table with information about each annotation in the semantic model. This information helps you understand the model.
Syntax
INFO.ANNOTATIONS ( [<Restriction name>, <Restriction value>], ... )
Parameters
Parameters are optional for this DAX function. When parameters are used, both must be given. More than one pair of parameters is allowed. The restriction name and value are text and entered in double-quotes.
| Term | Definition |
|---|---|
| Restriction name | Name of the restriction used to filter the results. |
| Restriction value | Value used to filter the results of the restriction. |
Restrictions
Typically, all columns of the DAX function results can be used as a restriction. Additional restrictions may also be allowed.
Return value
A table with the following columns:
| Column | Description |
|---|---|
| [ID] | A reference to the object. IDs are usually autogenerated and should not be changed after the model is created. Data type is unsigned long (4 bytes). |
| [ObjectID] | A reference to the object that owns this Annotation. |
| [ObjectType] | A reference to the type of object that owns this Annotation. |
| [Name] | The name of the object, used in code, script, and queries. |
| [Value] | The value of the annotation. |
| [ModifiedTime] | The time that the object was last modified. |
Remarks
Can only be run by users with write permission on the semantic model and not when live connected to the semantic model in Power BI Desktop. This function can be used in DAX queries, and can't be used in calculations.
Example 1 - DAX query
The following DAX query can be run in DAX query view:
EVALUATE
INFO.ANNOTATIONS()
This DAX query returns a table with all of the columns of this DAX function.
Example 2 - DAX query with joins
The following DAX query can be run in DAX query view:
EVALUATE
VAR _ObjectTypeEnum =
DATATABLE(
"ObjectType",INTEGER,
"Object",STRING,
{
{0,"Null"},
{1,"Model"},
{2,"DataSource"},
{3,"Table"},
{4,"Column"},
{5,"AttributeHierarchy"},
{6,"Partition"},
{7,"Relationship"},
{8,"Measure"},
{9,"Hierarchy"},
{10,"Level"},
{11,"Annotation"},
{12,"KPI"},
{13,"Culture"},
{14,"ObjectTranslation"},
{15,"LinguisticMetadata"},
{29,"Perspective"},
{30,"PerspectiveTable"},
{31,"PerspectiveColumn"},
{32,"PerspectiveHierarchy"},
{33,"PerspectiveMeasure"},
{34,"Role"},
{35,"RoleMembership"},
{36,"TablePermission"},
{37,"Variation"},
{38,"Set"},
{39,"PerspectiveSet"},
{40,"ExtendedProperty"},
{41,"Expression"},
{42,"ColumnPermission"},
{43,"DetailRowsDefinition"},
{44,"RelatedColumnDetails"},
{45,"GroupByColumn"},
{46,"CalculationGroup"},
{47,"CalculationItem"},
{48,"AlternateOf"},
{49,"RefreshPolicy"},
{50,"FormatStringDefinition"}
}
)
VAR _INFO =
INFO.ANNOTATIONS()
VAR _CombinedTable =
NATURALLEFTOUTERJOIN(
_INFO,
_ObjectTypeEnum
)
VAR _ModelObjects =
UNION(
SELECTCOLUMNS(
INFO.MEASURES(),
"ObjectID", [ID],
"Object Name", [Name]
),
SELECTCOLUMNS(
INFO.TABLES(),
"ObjectID", [ID],
"Object Name", [Name]
),
SELECTCOLUMNS(
INFO.COLUMNS(),
"ObjectID", [ID],
"Object Name", [ExplicitName]
),
SELECTCOLUMNS(
INFO.EXPRESSIONS(),
"ObjectID", [ID],
"Object Name", [Name]
),
SELECTCOLUMNS(
INFO.MODEL(),
"ObjectID", [ID],
"Object Name", [Name]
)
)
VAR _CombinedTable2 =
NATURALLEFTOUTERJOIN(
_CombinedTable,
_ModelObjects
)
RETURN
SELECTCOLUMNS(
_CombinedTable2,
"Object type", [Object],
"Object", [Object Name],
"Annotation name", [Name],
"Annotation value", [Value]
)
ORDER BY [Annotation name]
This DAX query returns a table with only the specified columns and joining to other INFO DAX functions and the enumeration table.
Enumerations
Columns returned in this INFO function give the ID of an enumeration, or lookup table. Here are the values for each enumeration in this DAX function.
ObjectType
| Number | Value |
|---|---|
| 0 | Null |
| 1 | Model |
| 2 | DataSource |
| 3 | Table |
| 4 | Column |
| 5 | AttributeHierarchy |
| 6 | Partition |
| 7 | Relationship |
| 8 | Measure |
| 9 | Hierarchy |
| 10 | Level |
| 11 | Annotation |
| 12 | KPI |
| 13 | Culture |
| 14 | ObjectTranslation |
| 15 | LinguisticMetadata |
| 29 | Perspective |
| 30 | PerspectiveTable |
| 31 | PerspectiveColumn |
| 32 | PerspectiveHierarchy |
| 33 | PerspectiveMeasure |
| 34 | Role |
| 35 | RoleMembership |
| 36 | TablePermission |
| 37 | Variation |
| 38 | Set |
| 39 | PerspectiveSet |
| 40 | ExtendedProperty |
| 41 | Expression |
| 42 | ColumnPermission |
| 43 | DetailRowsDefinition |
| 44 | RelatedColumnDetails |
| 45 | GroupByColumn |
| 46 | CalculationGroup |
| 47 | CalculationItem |
| 48 | AlternateOf |
| 49 | RefreshPolicy |
| 50 | FormatStringDefinition |
This table is based on the official documentation.
To join with INFO functions use this DAX query.
EVALUATE
DATATABLE(
"ObjectType",INTEGER,
"Object",STRING,
{
{0,"Null"},
{1,"Model"},
{2,"DataSource"},
{3,"Table"},
{4,"Column"},
{5,"AttributeHierarchy"},
{6,"Partition"},
{7,"Relationship"},
{8,"Measure"},
{9,"Hierarchy"},
{10,"Level"},
{11,"Annotation"},
{12,"KPI"},
{13,"Culture"},
{14,"ObjectTranslation"},
{15,"LinguisticMetadata"},
{29,"Perspective"},
{30,"PerspectiveTable"},
{31,"PerspectiveColumn"},
{32,"PerspectiveHierarchy"},
{33,"PerspectiveMeasure"},
{34,"Role"},
{35,"RoleMembership"},
{36,"TablePermission"},
{37,"Variation"},
{38,"Set"},
{39,"PerspectiveSet"},
{40,"ExtendedProperty"},
{41,"Expression"},
{42,"ColumnPermission"},
{43,"DetailRowsDefinition"},
{44,"RelatedColumnDetails"},
{45,"GroupByColumn"},
{46,"CalculationGroup"},
{47,"CalculationItem"},
{48,"AlternateOf"},
{49,"RefreshPolicy"},
{50,"FormatStringDefinition"}
}
)