INFO.ATTRIBUTEHIERARCHYSTORAGES DAX Function (Information)
Returns a list of all attribute hierarchy storages in the current model with columns matching the schema rowset for attribute hierarchy storage objects.
Syntax
| Parameter | Attributes | Description |
|---|---|---|
| RestrictionName | Optional Repeatable |
Restriction name. |
| RestrictionValue | Optional Repeatable |
Restriction value. |
Return values
A table with one row for each attribute hierarchy storage in the model. The columns match the TMSCHEMA_ATTRIBUTE_HIERARCHY_STORAGES DMV.
| Field | Type |
|---|---|
| ID | Integer |
| AttributeHierarchyID | Integer |
| SortOrder | Integer |
| OptimizationLevel | Integer |
| MaterializationType | Integer |
| ColumnPositionToData | Integer |
| ColumnDataToPosition | Integer |
| DistinctDataCount | Integer |
| DataVersion | Integer |
| StorageFileID | Integer |
| SystemTableID | Integer |
| HasStatistics | Boolean |
| MinValue | String |
| MaxValue | String |
| StringValueMaxLength | Integer |
Remarks
Corresponds to the TMSCHEMA_ATTRIBUTE_HIERARCHY_STORAGES 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.ATTRIBUTEHIERARCHYSTORAGES ( “AttributeHierarchyID”, “303” ) returns the storage of one attribute hierarchy.
The result has one row for each attribute hierarchy. AttributeHierarchyID is the ID of the row in INFO.ATTRIBUTEHIERARCHIES, and ID is the value that INFO.ATTRIBUTEHIERARCHIES shows in AttributeHierarchyStorageID. DistinctDataCount is the number of distinct values in the column. It is the same number that DISTINCTCOUNT returns, so BLANK counts as a value. Most of the other columns describe how the engine stores the data. Many of them are BLANK, for example StorageFileID and MinValue. To get the column name, join the result to INFO.ATTRIBUTEHIERARCHIES and INFO.COLUMNS, as in the example.
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
-- The five visible columns with the most distinct values, from the storage of the attribute hierarchies.
EVALUATE
VAR ColumnList =
SELECTCOLUMNS (
FILTER ( INFO.COLUMNS (), NOT [IsHidden] && NOT ISBLANK ( [ExplicitName] ) ),
"ColumnID", [ID],
"TableID", [TableID],
"Column", [ExplicitName]
)
VAR TableList =
SELECTCOLUMNS ( INFO.TABLES (), "TableID", [ID], "Table", [Name] )
VAR HierarchyList =
SELECTCOLUMNS (
NATURALINNERJOIN (
NATURALINNERJOIN ( INFO.ATTRIBUTEHIERARCHIES (), ColumnList ),
TableList
),
"AttributeHierarchyID", [ID],
"Table", [Table],
"Column", [Column]
)
VAR Result =
SELECTCOLUMNS (
NATURALINNERJOIN ( INFO.ATTRIBUTEHIERARCHYSTORAGES (), HierarchyList ),
"Table", [Table],
"Column", [Column],
"Distinct values", [DistinctDataCount]
)
RETURN
TOPN ( 5, Result, [Distinct values], DESC, [Table], ASC, [Column], ASC )
ORDER BY [Distinct values] DESC, [Table], [Column]
| Table | Column | Distinct values |
|---|---|---|
| Customer | Customer Code | 18869 |
| Customer | CustomerKey | 18869 |
| Customer | Customer Name | 18402 |
| Customer | Name | 18401 |
| Customer | Address Line 1 | 12798 |
Last update: Nov 27, 2026 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://learn.microsoft.com/en-us/dax/info-attributehierarchystorages-function-dax