mdx-cubevalue-extraction
Skill2 starsChanged 5 months agoMITView on GitHub
Use when Excel work involves CUBEVALUE, CUBEMEMBER, CUBESET, MDX measures, dimensions, hierarchies, members, ThisWorkbookDataModel, or report-cell extraction.
In this repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- excel-ado-sql-data-accessSkill
- excel-bi-routerSkill
- excel-deliverable-publisherSkill
- excel-report-builderSkill
- excel-testing-fixturesSkill
- excel-vba-workbook-engineeringSkill
- excel-workbook-qa-auditorSkill
- mdx-cubevalue-extractionSkill
- office-environment-diagnosticsSkill
- power-bi-semantic-modelSkill
- power-pivot-dax-modelingSkill
- power-query-m-engineeringSkill
- excel-ado-sql-data-accessSkill
- excel-bi-routerSkill
- excel-deliverable-publisherSkill
- excel-report-builderSkill
- excel-testing-fixturesSkill
- excel-vba-workbook-engineeringSkill
- excel-workbook-qa-auditorSkill
- mdx-cubevalue-extractionSkill
- office-environment-diagnosticsSkill
- power-bi-semantic-modelSkill
- power-pivot-dax-modelingSkill
- power-query-m-engineeringSkill
- excel-ado-sql-data-accessSkill
- excel-bi-routerSkill
- excel-deliverable-publisherSkill
- excel-report-builderSkill
- excel-testing-fixturesSkill
- excel-vba-workbook-engineeringSkill
- excel-workbook-qa-auditorSkill
- office-environment-diagnosticsSkill
- power-bi-semantic-modelSkill
- power-pivot-dax-modelingSkill
- power-query-m-engineeringSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Treat Excel CUBE formulas as the report layer over a model.
- Very specific: line 15
Run tools/inspect_excel_bi_workbook.py <workbook> --markdown from the plugin root when a workbook file is available.
- Very specific: line 16
If the workbook uses Power Pivot/Data Model measures, generate a model report with tools/build_excel_bi_model_report.py or …
- Very specific: line 18
Run tools/analyze_measure_rename_impact.py before renaming or deleting model measures used by report-layer CUBE formulas.
- Very specific: line 19
Run tools/build_measure_rename_rewrite_plan.py when a measure rename needs a reviewable list of report-layer [Measures].[...] replacements.
- Very specific: line 20
Use tools/create_cube_formula_fixture.py only for parser/report smoke tests when no safe workbook fixture is available.
- Very specific: line 21
When a real ADOMD/MSOLAP endpoint connection string is available, use tools/test_excel_adomd_query.ps1 to validate MDX query behavior …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MDX CUBEVALUE Extraction
Core Rule
Treat Excel CUBE formulas as the report layer over a model. Confirm the measure and member paths before changing formulas.
Workflow
- Identify connection name, usually
ThisWorkbookDataModel. - Run
tools/inspect_excel_bi_workbook.py <workbook> --markdownfrom the plugin root when a workbook file is available. - If the workbook uses Power Pivot/Data Model measures, generate a model report with
tools/build_excel_bi_model_report.pyortools/invoke_excel_bi_com.sh model-reporton Windows Git Bash. - Generate a CUBE dependency report with
tools/build_cube_dependency_report.pywhen formulas must be traced by sheet, cell, measure, member, or helper cell. - Run
tools/analyze_measure_rename_impact.pybefore renaming or deleting model measures used by report-layer CUBE formulas. - Run
tools/build_measure_rename_rewrite_plan.pywhen a measure rename needs a reviewable list of report-layer[Measures].[...]replacements; for measure deletion, block direct and downstream helper-cell references for manual review. - Use
tools/create_cube_formula_fixture.pyonly for parser/report smoke tests when no safe workbook fixture is available; it does not contain a live model. - When a real ADOMD/MSOLAP endpoint connection string is available, use
tools/test_excel_adomd_query.ps1to validate MDX query behavior outside the worksheet formula layer. - Identify measure, dimension, hierarchy, and member references.
- Determine whether formulas should use direct MDX strings or helper
CUBEMEMBERcells. - Build formulas from stable cell references where the report is parameterized.
- Validate returned values,
#N/A, and#GETTING_DATAbehavior in Excel.
Reference Selection
Read:
references/cube-formulas.mdfor formula templates.references/cube-dependency-report.mdfor report-layer dependency tracing and diagnostic flags.references/mdx-member-paths.mdfor member path patterns.references/official-links.mdfor Microsoft references.
Common Issues
- Wrong hierarchy or member unique name.
- Measure exists in DAX but is referenced with the wrong MDX measure path.
- Report formula references stale helper cells.
- Data Model not refreshed.
#GETTING_DATApersists because the model/query has not completed.
Cross-Platform Boundary
CUBE formulas can be generated anywhere. Actual evaluation against ThisWorkbookDataModel requires Excel.
Scripts
tools/inspect_excel_bi_workbook.py <workbook> [--markdown] [--out-json <path>]scans OpenXML workbook structure for CUBE formulas, workbook connections, pivot caches, tables, VBA parts, Power Pivot-like parts, and Power Query-like parts. Use this before changing report formulas.tools/build_excel_bi_model_report.py --model-json <path> [--openxml-json <path>] [--out-md <path>] [--out-json <path>]maps scanned CUBE formula measure references back to exported Data Model measures and flags missing or unused references.tools/build_cube_dependency_report.py --openxml-json <path> [--model-json <path>] [--out-md <path>] [--out-json <path>] [--out-mermaid <path>]builds a report-layer dependency graph by sheet, cell, measure, member reference, and helper cell reference. Measure/member parsing supports MDX escaped closing brackets such as]]inside bracket identifiers.tools/analyze_measure_rename_impact.py --model-json <path> --openxml-json <path> --rename "Old=New" [--delete <measure>] [--out-json <path>] [--out-md <path>]reports which report-layer CUBE formulas and DAX measures reference a measure planned for rename or deletion, including escaped MDX measure names.tools/build_measure_rename_rewrite_plan.py --model-json <path> --openxml-json <path> --rename "Old=New" [--delete <measure>] [--out-json <path>] [--out-md <path>] [--fail-on-manual-review]builds a reviewable formula replacement plan for DAX dependencies and report-layer CUBE formulas, including escaped MDX measure identifiers. It keeps dynamic period/member helper references visible and marks CUBE formulas that depend on rewritten measure helper cells. It does not edit the workbook or evaluate formulas. Delete operations are manual-review only, including formulas that depend on a deleted-measure helper cell.tools/create_cube_formula_fixture.py --workbook <path> [--model-json <path>]creates a generic.xlsxcontaining structuralCUBEMEMBERandCUBEVALUEformulas plus an optional known-measure JSON file for dependency-report smoke tests. This validates parsing and diagnostics only, not Excel calculation.tools/test_excel_adomd_query.ps1 [-ProbeOnly] [-ConnectionString <text>] [-Mdx <text>|-MdxPath <path>] [-OutJson <path>]validates ADOMD COM activation or runs an explicit endpoint MDX query. This is for MSOLAP/ADOMD endpoints, not for directly evaluating in-workbookCUBEVALUEformulas.tools/invoke_excel_bi_com.sh model-report -w <workbook> [--include-columns] [--out-md <path>] [--out-json <path>]runs the Windows Excel COM Data Model export plus CUBE formula scan from Git Bash/MSYS/Cygwin.tools/invoke_excel_bi_com.sh cube-report -w <workbook> [--include-model] [--out-md <path>] [--out-json <path>] [--out-mermaid <path>]runs OpenXML CUBE scanning plus optional Data Model measure export from Windows Git Bash/MSYS/Cygwin.tools/invoke_excel_bi_com.sh adomd-query [--probe-only] [--connection-string <text>] [--mdx <text>|--mdx-file <path>] [--out-json <path>]runs ADOMD probing or endpoint query validation from Windows Git Bash/MSYS/Cygwin.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

