Cube.DisplayFolders

Table

Returns a nested tree of tables representing the display folder hierarchy of objects available in the cube.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Cube.DisplayFolders(cube as table) as table

Parameters

NameTypeRequiredDescription
cubetableYesThe cube table to retrieve display folders from.

Return Value

tableA nested tree of tables representing the display folder hierarchy of dimensions, measures, and other objects in the cube.

Remarks

Cube.DisplayFolders returns a nested tree of tables representing the display folder hierarchy of the objects (such as dimensions and measures) available for use in the cube. Display folders are an organizational feature in Analysis Services models that group related measures, dimensions, or KPIs into a logical folder structure for easier navigation.

The returned structure mirrors the folder hierarchy defined in the cube's metadata. Each folder is represented as a nested table, and the leaf nodes are the actual dimension attributes or measures. This function is useful for building navigation interfaces or for discovering how the model author organized the cube's objects.

Display folders are commonly used in large models with many measures or dimensions to improve discoverability. If no display folders are defined, all objects appear at the root level.

Examples

Example 1: Retrieve the display folder tree

let
    Source = AnalysisServices.Database("localhost", "AdventureWorks"),
    Cube = Source{[Name = "Adventure Works"]}[Data],
    Folders = Cube.DisplayFolders(Cube)
in
    Folders

Example 2: Navigate into a specific display folder

let
    Source = AnalysisServices.Database("localhost", "AdventureWorks"),
    Cube = Source{[Name = "Adventure Works"]}[Data],
    Folders = Cube.DisplayFolders(Cube),
    SalesFolder = Folders{[Name = "Internet Sales"]}[Data]
in
    SalesFolder

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks