INFO.CALCULATIONITEMS DAX Function (Information)
Returns a list of all calculation items in the current model with columns matching the schema rowset for calculation item objects.
Syntax
| Parameter | Attributes | Description |
|---|---|---|
| RestrictionName | Optional Repeatable |
Restriction name. |
| RestrictionValue | Optional Repeatable |
Restriction value. |
Return values
A table with one row for each calculation item in the model. The columns match the TMSCHEMA_CALCULATION_ITEMS DMV.
| Field | Type |
|---|---|
| ID | Integer |
| CalculationGroupID | Integer |
| FormatStringDefinitionID | Integer |
| Name | String |
| Description | String |
| ModifiedTime | DateTime |
| State | Integer |
| ErrorMessage | String |
| Expression | String |
| Ordinal | Integer |
Remarks
Corresponds to the TMSCHEMA_CALCULATION_ITEMS 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, but ErrorMessage is not a valid restriction name. For example, INFO.CALCULATIONITEMS ( “CalculationGroupID”, “12986” ) returns the calculation items of one calculation group.
The function returns one row for each calculation item. CalculationGroupID is the ID of the calculation group in INFO.CALCULATIONGROUPS. To get the name of the calculation group, join INFO.CALCULATIONGROUPS to INFO.TABLES, as in the example. Ordinal is the position of the item in its calculation group, and Expression is the DAX expression of the item. FormatStringDefinitionID is BLANK when the item has no format string expression. Otherwise, it is the ID of the row in INFO.FORMATSTRINGDEFINITIONS that contains the format string expression. State is 1 when the calculation item is ready to be used. In the test model, all rows have State 1 and ErrorMessage is BLANK.
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.CALCULATIONITEMS returns one row for each calculation item.
-- The query shows the calculation items of each calculation group, in the order of Ordinal.
-- Format string is TRUE when the item has a format string expression (FormatStringDefinitionID is not blank).
EVALUATE
VAR GroupList =
SELECTCOLUMNS (
NATURALINNERJOIN (
INFO.CALCULATIONGROUPS (),
SELECTCOLUMNS ( INFO.TABLES (), "TableID", [ID], "Calculation group", [Name] )
),
"CalculationGroupID", [ID],
"Calculation group", [Calculation group]
)
VAR Result =
SELECTCOLUMNS (
NATURALINNERJOIN ( INFO.CALCULATIONITEMS (), GroupList ),
"Calculation group", [Calculation group],
"Ordinal", [Ordinal],
"Calculation item", [Name],
"Format string", NOT ISBLANK ( [FormatStringDefinitionID] ),
"State", [State]
)
RETURN
Result
ORDER BY [Calculation group], [Ordinal]
| Calculation group | Ordinal | Calculation item | Format string | State |
|---|---|---|---|---|
| Scale | 0 | Value | False | 1 |
| Scale | 1 | Thousands | True | 1 |
| Scale | 2 | Millions | True | 1 |
| Time calc | 0 | Current | False | 1 |
| Time calc | 1 | Prev Year | False | 1 |
| Time calc | 2 | Growth | False | 1 |
| Time calc | 3 | Growth % | True | 1 |
Last update: Dec 2, 2026 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://learn.microsoft.com/en-us/dax/info-calculationitems-function-dax