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 calculation item in the semantic model. This function provides metadata about calculation items within calculation groups.
Syntax
INFO.CALCULATIONITEMS ( [<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 name | Data type | Description |
|---|---|---|
| [ID] | Integer | The unique identifier of the calculation item |
| [CalculationGroupID] | Integer | The unique identifier of the calculation group that contains this calculation item |
| [FormatStringDefinition] | String | The format string definition for the calculation item |
| [Name] | String | The name of the calculation item |
| [Description] | String | The description of the calculation item |
| [ModifiedTime] | DateTime | The date and time when the calculation item was last modified |
| [State] | String | The state of the calculation item |
| [ErrorMessage] | String | Any error message associated with the calculation item |
| [Expression] | String | The DAX expression for the calculation item |
| [Ordinal] | Integer | The ordinal position of the calculation item within its calculation group |
Remarks
- Typically used in DAX queries to inspect and document model metadata.
- Permissions required depend on the host. Querying full metadata may require model admin permissions.
Example
The following DAX query can be run in DAX query view:
EVALUATE
INFO.CALCULATIONITEMS()
Example 2 - DAX query with joins
The following DAX query can be run in DAX query view:
EVALUATE
VAR _CalculationItems =
INFO.CALCULATIONITEMS()
VAR _CalculationGroups =
SELECTCOLUMNS(
INFO.CALCULATIONGROUPS(),
"CalculationGroupID", [ID],
"Calculation Group Description", [Description]
)
VAR _CombinedTable =
NATURALLEFTOUTERJOIN(
_CalculationItems,
_CalculationGroups
)
RETURN
SELECTCOLUMNS(
_CombinedTable,
"Calculation Item Name", [Name],
"Calculation Group Description", [Calculation Group Description],
"Expression", [Expression],
"Ordinal", [Ordinal]
)
ORDER BY [Calculation Group Description], [Ordinal]