Create an Azure Analysis Services cube [Mcube] with a single expression [SharedExpression] that is exposed through which contents is exposed through [SharedExpressionTable] table. All for the sake of reaching for the #shared construct
✓ Published0🌍 Public
HHugoberry
Last edited Aug 17, 2017
Created on Aug 16, 2017
This example demonstrates a self-referential use of the Power Query M formula language inside an Azure Analysis Services tabular model, exposing the `#shared` construct as a table. The TMSL file defines a database named "Mcube" with an M expression called `SharedExpression` that simply returns `#shared`, listing all available M functions and constants. A table named `SharedExpressionTable` then queries this expression via `#sections[main][SharedExpression]` in its partition source, rendering the shared metadata as columns "Name" and "Value." This effectively turns the engine’s own namespace into queryable data, showing how TMSL and M can introspect the environment.
AI-generated description