Generating MDX Forms with Slice
Generating MDX Forms with Slice
There are two ways to generate an MDX Form in Slice. Both methods produce the same result — an Excel report driven by a single MDXForm function, with the MDX query auto-generated by Slice.
Method 1 – Insert from Excel (Right-Click)
Use this method when you want to start from a blank workbook or insert an MDX Form into an existing sheet.
Open any Excel workbook.
Right-click on the target cell.
Navigate to Slice → Insert Form → MDX Form.
Select the cube and view from the dialog.
Click OK.
The MDX Form is inserted into the sheet with the MDXForm function and auto-generated MDX query.
Method 2 – Export from the Cube Viewer
Use this method when you already have a view configured in the Slice Cube Viewer and want to export it directly as an MDX Form.
Open the desired cube and configure your view (e.g. the default view of the Listing AnalysisSolution cube).
Click the Excel export icon in the toolbar.
From the dropdown, select Export MDX Form.
The view is exported to Excel as an MDX Form.
After Exporting – Exploring the Components
Once the MDX Form is in Excel:
Save the workbook to your desktop or preferred location.
Unhide rows 1–10 to reveal the hidden structural components (MDX query, format range, and MDXForm function).
Review the auto-generated MDX query and the
MDXFormfunction arguments.
For a full explanation of each component, see What is an MDX Form and How Does it Work?
Tip: Working with the Format Range
The Format Range is always 7 rows × 2 columns. You can customise cell formatting styles directly in this range — the same way you would in a traditional Active Form. Changes to the Format Range are applied when the sheet is rebuilt (ALT+F9).