Cube.DisplayFolders
TableReturns a nested tree of tables representing the display folder hierarchy of objects available in the cube.
Syntax
Cube.DisplayFolders(cube as table) as tableParameters
| Name | Type | Required | Description |
|---|---|---|---|
cube | table | Yes | The cube table to retrieve display folders from. |
Return Value
table — A 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
FoldersExample 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