Begivenhed
31. mar., 23 - 2. apr., 23
Den største Fabric-, Power BI- og SQL-læringshændelse. 31. marts - 2. april. Brug koden FABINSIDER til at gemme $400.
Tilmeld dig i dagDenne browser understøttes ikke længere.
Opgrader til Microsoft Edge for at drage fordel af de nyeste funktioner, sikkerhedsopdateringer og teknisk support.
Applies to:
SQL Server Analysis Services
Azure Analysis Services
Fabric/Power BI Premium
Multidimensional Expressions (MDX) provides you with a number of tools for generating calculated values, such as calculated members, custom rollups, and custom members. However, using these features to affect a specific set of cells, or a single cell for that matter, would be difficult.
To generated calculated values for specifically for cells, you need to use the calculated cells feature in MDX. Calculated cells let you define a specific slice of cells, called a calculation subcube, and apply a formula to each and every cell within the calculation subcube, subject to an optional condition that can be applied to each cell.
Calculated cells also offer complex functionality, such as goal-seeking formulas, as used in KPIs, or speculative analysis formulas. This level of functionality comes from the pass order feature in Microsoft SQL Server SQL Server Analysis Services that allows recursive passes to be made with calculated cells, with calculation formulas applied at specific passes in the pass order. For more information on pass order, see Understanding Pass Order and Solve Order (MDX).
In terms of creation scope, calculated cells are similar to both named sets and calculated members in that calculated cells can be temporarily created for the lifetime of either a session or a single query, or made globally available as part of a cube:
Query-scoped To create a calculated cell that is defined as part of an MDX query, and therefore whose scope is limited to the query, you use the WITH keyword. You can then use the calculated cell within an MDX SELECT statement. Using this approach, the calculated cell created by using the WITH keyword can be changed without disturbing the SELECT statement.
For more information about how to use the WITH keyword to create calculated members, see Creating Query-Scoped Cell Calculations (MDX).
Session-scoped To create a calculated member whose scope is wider than the context of the query, that is, whose scope is the lifetime of the MDX session, you use either the CREATE CELL CALCULATION or ALTER CUBE statement.
For more information about how to use either the CREATE CELL CALCULATION or ALTER CUBE statement to create calculated cells in a session, see Creating Session-Scoped Calculated Cells
ALTER CUBE Statement (MDX)
CREATE CELL CALCULATION Statement (MDX)
Creating Query-Scoped Cell Calculations (MDX)
MDX Query Fundamentals (Analysis Services)
Begivenhed
31. mar., 23 - 2. apr., 23
Den største Fabric-, Power BI- og SQL-læringshændelse. 31. marts - 2. april. Brug koden FABINSIDER til at gemme $400.
Tilmeld dig i dagTræning
Modul
Create visual calculations in Power BI Desktop - Training
Calculations in Power BI are necessary to enrich data analysis. Visual calculations simplify complex formulas, enhance performance, and reduce maintenance.
Certificering
Microsoft Office-specialist: Excel (Office 2016) - Certifications
Demonstrer, at du har de færdigheder, der er nødvendige for at få mest ud af Excel 2016, ved at opnå en Microsoft Office Specialist (MOS)-certificering.
Dokumentation
Learn how Multidimensional Expressions (MDX) can be used to manipulate the data in a variety of ways.
Learn how the ability to construct and use measures in an MDX query provides a great deal of manipulation capability for tabular data.
Building Calculated Members in MDX (MDX)
Learn how the ability to construct and use calculated members in an MDX query provides a great deal of manipulation capability for multidimensional data.