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

INFO.ATTRIBUTEHIERARCHYSTORAGES ( [<RestrictionName> [, [<RestrictionValue>] [, <RestrictionName> [, [<RestrictionValue>] [, … ] ] ] ] ] )
Parameter Attributes Description
RestrictionName Optional
Repeatable

Restriction name.

RestrictionValue Optional
Repeatable

Restriction value.

Return values

Table An entire table or a table with one or more columns.

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

2018-2026 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Passed by Expression

This parameter is passed by expression and can be evaluated multiple times in different evaluation contexts.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of INFO.ATTRIBUTEHIERARCHYSTORAGES? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.