Skip to main content
← All functions

CUBEVALUE function

Returns an aggregated value from the cube.

Syntax

CUBEVALUE(Connection, [Member_expression])

Square brackets indicate optional arguments.

Arguments

ArgumentRequiredMeaning
ConnectionYesRequired. A text string of the name of the connection to the cube."Sales"
Member_expressionNo · repeatsOptional. A text string of a multidimensional expression (MDX) that evaluates to a member or tuple within the cube. Alternatively, member_expression can be a set defined with the CUBESET function. Use member_expression as a slicer to define the portion of the cube for which the aggregated value is returned. If no measure is specified in member_expression, the default measure for that cube is used."[Measures].[Sales]"

Query a local multidimensional report

Use CUBEVALUE in a connected seven-function report. This fictional local cube has Region, Month and Product hierarchies. A displayed caption can differ from its unique member identifier. Refresh after fact edits; every checked answer comes from the complete current source.

Browser exercise: no external business connection. Downloads contain checked fixed values, every original fact and formula text. Native Excel CUBE recalculation requires a real OLAP connection and remains separate.

Member identifiers and source-defined measures

Revenue, Cost and Target sum matching fact rows; Profit is Revenue minus Cost; Margin divides total Profit by total Revenue. An unobserved valid intersection returns empty text, while an observed numeric zero stays zero. The Revenue target KPI compares Revenue with Target: green at target, amber from 90%, red below; Trend compares the selected or latest month with its previous metadata month; Weight is one. These definitions belong to this source.

Use one member per hierarchy in a tuple. Supported sets are explicit homogeneous nonoverlapping tuples or the All member’s Children. Set sorting supports numeric, caption and metadata order. General MDX functions and arbitrary provider connections require a different runtime.

HierarchyCaptionUnique identifier
RegionAll Region[Region].[Region].[All]
RegionNorth[Region].[Region].&[North]
RegionSouth[Region].[Region].&[South]
RegionNo observed facts[Region].[Region].&[Empty]
MonthAll Month[Month].[Month].[All]
Month2026-01[Month].[Month].&[2026-01]
Month2026-02[Month].[Month].&[2026-02]
Month2026-03[Month].[Month].&[2026-03]
ProductAll Product[Product].[Product].[All]
ProductService[Product].[Product].&[Service]
ProductParts[Product].[Product].&[Parts]
MeasuresRevenue[Measures].[Revenue]
MeasuresCost[Measures].[Cost]
MeasuresTarget[Measures].[Target]
MeasuresProfit[Measures].[Profit]
MeasuresMargin[Measures].[Margin]
MeasuresCount[Measures].[Count]
MeasuresStatus[Measures].[Status]
MeasuresTrend[Measures].[Trend]
MeasuresWeight[Measures].[Weight]

Cell / resultCurrent calculated valueIndependent targetType
J2 / First member captionBlank cellCaption; identity checked in linked queriesUnchecked
J3 / Second member captionBlank cellCaption; identity checked in linked queriesUnchecked
J4 / First member revenueBlank cell410Unchecked
J5 / Second member revenueBlank cell320Unchecked
J6 / Revenue measure captionBlank cellCaption; identity checked in linked queriesUnchecked
J7 / All observed revenueBlank cell730Unchecked
J8 / Ranked region setBlank cellCaption; identity checked in linked queriesUnchecked
J9 / Members including emptyBlank cell3Unchecked
J10 / Top ranked memberBlank cellCaption; identity checked in linked queriesUnchecked
J11 / Top region revenueBlank cell410Unchecked
J12 / Original top captionBlank cell"North"Unchecked
J13 / Top unique nameBlank cell"[Region].[Region].&[North]"Unchecked
J14 / Region / first month tupleBlank cellCaption; identity checked in linked queriesUnchecked
J15 / Tuple revenueBlank cell150Unchecked
J16 / KPI value memberBlank cellCaption; identity checked in linked queriesUnchecked
J17 / KPI actualBlank cell730Unchecked
J18 / KPI goal memberBlank cellCaption; identity checked in linked queriesUnchecked
J19 / KPI goalBlank cell800Unchecked
J20 / KPI status memberBlank cellCaption; identity checked in linked queriesUnchecked
J21 / KPI statusBlank cell0Unchecked
J22 / KPI trend memberBlank cellCaption; identity checked in linked queriesUnchecked
J23 / KPI trendBlank cell-1Unchecked
J24 / KPI weight memberBlank cellCaption; identity checked in linked queriesUnchecked
J25 / KPI weightBlank cell1Unchecked
J26 / KPI current time memberBlank cellCaption; identity checked in linked queriesUnchecked
J27 / Current month revenueBlank cell190Unchecked
J28 / Set revenueBlank cell730Unchecked
J29 / Reserved empty member / current factsBlank cellEmpty text ("")Unchecked
J30 / Original zero coordinate / current valueBlank cell0Unchecked
J31 / Inline member preserves IDBlank cell410Unchecked
J32 / Unknown member errorBlank cell#N/A (formula error)Unchecked
J33 / Unknown connection errorBlank cell#NAME? (formula error)Unchecked
J34 / Conflicting hierarchy errorBlank cell#N/A (formula error)Unchecked
J35 / Unknown property errorBlank cell#N/A (formula error)Unchecked

Reference and compatibility

Univer 1.0.4 / Apache-2.0. Calculation checks cover the supplied examples only. The browser worksheet does not implement every Excel feature, external service or connected data type.