Cube

CUBEVALUE Function in Excel

Returns an aggregated value from a cube.

Syntax

  • =CUBEVALUE(connection, [member_expression1], ...)

Arguments

  • connection (required): Connection string to cube
  • member_expression1 (optional): MDX expression for member

Examples

  • =CUBEVALUE("Sales", "[Measures].[Revenue]") - Get revenue measure - Result: Value

CUBEVALUE and data models

  • Validate members with CUBEMEMBER before CUBEVALUE.
  • Confirm the connection name matches your Power Pivot or OLAP model.
  • Explore summaries with [Pivot tables guide](/guides/excel-pivot-tables-guide/).

Common errors

  • #N/A if connection fails

Use cases

  • OLAP reporting
  • Power Pivot
  • Business intelligence

Frequently asked questions

  • What is CUBEVALUE used for? CUBEVALUE retrieves aggregated values from OLAP cubes or Power Pivot data models. It's the primary function for pulling measures (like Sum of Sales, Count of Orders) with specific dimension filters into Excel cells.
  • How do I connect CUBEVALUE to Power Pivot? Use the Data Model connection: =CUBEVALUE("ThisWorkbookDataModel", "[Measures].[Sum of Sales]", CUBEMEMBER("ThisWorkbookDataModel", "[Date].[Year].&[2024]")). The connection name for the current workbook's data model is 'ThisWorkbookDataModel'.
  • Why does CUBEVALUE return #N/A? Common causes: invalid connection name, incorrect MDX syntax, member doesn't exist, or no data for the intersection. Check spelling of measures and dimensions. Use CUBEMEMBER to validate individual members before combining in CUBEVALUE.

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.