{"id":123,"date":"2025-07-15T13:34:46","date_gmt":"2025-07-15T13:34:46","guid":{"rendered":"https:\/\/functiontranslator.com\/2021\/02\/12\/cubeset\/"},"modified":"2021-02-13T11:33:29","modified_gmt":"2021-02-13T11:33:29","slug":"cubeset","status":"publish","type":"post","link":"https:\/\/functiontranslator.com\/en\/cubeset\/","title":{"rendered":"CUBESET"},"content":{"rendered":"<p>Today we are going to delve into the CUBESET function, available in both Microsoft Excel and Google Sheets. CUBESET is an advanced function that enables you to define and retrieve a set of members or tuples from a cube on the server back into your spreadsheet.<\/p>\n<h2>Basic Syntax<\/h2>\n<p>The CUBESET function shares a similar syntax across both Microsoft Excel and Google Sheets:<\/p>\n<pre><code>CUBESET(connection, set_expression, caption, hierarchy_expression, [member_property])<\/code><\/pre>\n<ul>\n<li><strong>connection:<\/strong> This is your link to an external data source, typically an OLAP cube, within your workbook.<\/li>\n<li><strong>set_expression:<\/strong> A string that specifies a set of members or tuples by sending this expression to the cube on the server.<\/li>\n<li><strong>caption:<\/strong> (Optional) A label that you assign to the resultant set for easier identification.<\/li>\n<li><strong>hierarchy_expression:<\/strong> (Optional) An MDX (Multidimensional Expressions) string that defines how members or tuples are returned.<\/li>\n<li><strong>member_property:<\/strong> (Optional) This additional string expression can be used to fetch specific properties of a member.<\/li>\n<\/ul>\n<h2>Example Usage<\/h2>\n<p>Let&#8217;s go through a few examples to clearly understand how the CUBESET function operates.<\/p>\n<h2>Example 1: Basic CUBESET Function<\/h2>\n<p>Here, we&#8217;ll demonstrate a simple use of the CUBESET function to pull a data set from an OLAP cube.<\/p>\n<table>\n<tr>\n<th>Data<\/th>\n<th>Formula<\/th>\n<\/tr>\n<tr>\n<td>Set Name<\/td>\n<td>=CUBESET(&#8220;OLAPDB&#8221;,&#8221;[Product].[Category].MEMBERS&#8221;,&#8221;Product Categories&#8221;)<\/td>\n<\/tr>\n<\/table>\n<p>In this scenario, we connect to an OLAP database named &#8220;OLAPDB&#8221; and extract all members from the product category hierarchy, naming the set &#8220;Product Categories.&#8221;<\/p>\n<h2>Example 2: CUBESET with Hierarchy Expression<\/h2>\n<p>This example incorporates a hierarchy expression to refine our CUBESET function further.<\/p>\n<table>\n<tr>\n<th>Data<\/th>\n<th>Formula<\/th>\n<\/tr>\n<tr>\n<td>Set Name<\/td>\n<td>=CUBESET(&#8220;OLAPDB&#8221;,&#8221;TOPCOUNT([Product].[Category].MEMBERS, 5, [Measures].[Sales Amount])&#8221;,&#8221;Top 5 Product Categories by Sales&#8221;)<\/td>\n<\/tr>\n<\/table>\n<p>In this case, the function not only retrieves product categories but also selects the top 5 categories based on sales amounts, facilitated by the hierarchy expression &#8220;TOPCOUNT([Product].[Category].MEMBERS, 5, [Measures].[Sales Amount]).&#8221;<\/p>\n<p>Using the CUBESET function in Excel or Google Sheets, extracting specific sets of data from OLAP cubes becomes straightforward and customizable. Try varying the set and hierarchy expressions to tailor your data extraction to meet your specific needs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Defines a calculated set of members or tuples by sending a set expression to the cube on the server, which creates the set, and then returns that set to Microsoft Office Excel<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[208],"tags":[],"class_list":["post-123","post","type-post","status-publish","format-standard","hentry","category-cube"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Excel CUBESET Function \u2013 How It Works, Formula Examples and Syntax<\/title>\n<meta name=\"description\" content=\"Learn what the Excel CUBESET function does. Clear syntax explanation and useful formula examples.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/functiontranslator.com\/en\/cubeset\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Excel CUBESET Function \u2013 How It Works, Formula Examples and Syntax\" \/>\n<meta property=\"og:description\" content=\"Learn what the Excel CUBESET function does. Clear syntax explanation and useful formula examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/functiontranslator.com\/en\/cubeset\/\" \/>\n<meta property=\"og:site_name\" content=\"Function Translator\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-15T13:34:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-13T11:33:29+00:00\" \/>\n<meta name=\"author\" content=\"glavadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Excel CUBESET Function \u2013 How It Works, Formula Examples and Syntax\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"glavadmin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/functiontranslator.com\/en\/cubeset\/\",\"url\":\"https:\/\/functiontranslator.com\/en\/cubeset\/\",\"name\":\"Excel CUBESET Function \u2013 How It Works, Formula Examples and Syntax\",\"isPartOf\":{\"@id\":\"https:\/\/functiontranslator.com\/no\/#website\"},\"datePublished\":\"2025-07-15T13:34:46+00:00\",\"dateModified\":\"2021-02-13T11:33:29+00:00\",\"author\":{\"@id\":\"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/87663eece497ca58643166ecb09f1389\"},\"description\":\"Learn what the Excel CUBESET function does. Clear syntax explanation and useful formula examples.\",\"breadcrumb\":{\"@id\":\"https:\/\/functiontranslator.com\/en\/cubeset\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/functiontranslator.com\/en\/cubeset\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/functiontranslator.com\/en\/cubeset\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Function Excel\",\"item\":\"https:\/\/functiontranslator.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cube\",\"item\":\"https:\/\/functiontranslator.com\/en\/cube\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"CUBESET\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/functiontranslator.com\/no\/#website\",\"url\":\"https:\/\/functiontranslator.com\/no\/\",\"name\":\"Function Translator\",\"description\":\"Excel function translator\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/functiontranslator.com\/no\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/87663eece497ca58643166ecb09f1389\",\"name\":\"glavadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/03ccd9347c5339db75deede5a8c5b2bf1d40e0bce26a5251fcaac6331d381db8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/03ccd9347c5339db75deede5a8c5b2bf1d40e0bce26a5251fcaac6331d381db8?s=96&d=mm&r=g\",\"caption\":\"glavadmin\"},\"sameAs\":[\"https:\/\/functiontranslator.com\"],\"url\":\"https:\/\/functiontranslator.com\/en\/author\/glavadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Excel CUBESET Function \u2013 How It Works, Formula Examples and Syntax","description":"Learn what the Excel CUBESET function does. Clear syntax explanation and useful formula examples.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/functiontranslator.com\/en\/cubeset\/","og_locale":"en_US","og_type":"article","og_title":"Excel CUBESET Function \u2013 How It Works, Formula Examples and Syntax","og_description":"Learn what the Excel CUBESET function does. Clear syntax explanation and useful formula examples.","og_url":"https:\/\/functiontranslator.com\/en\/cubeset\/","og_site_name":"Function Translator","article_published_time":"2025-07-15T13:34:46+00:00","article_modified_time":"2021-02-13T11:33:29+00:00","author":"glavadmin","twitter_card":"summary_large_image","twitter_title":"Excel CUBESET Function \u2013 How It Works, Formula Examples and Syntax","twitter_misc":{"Written by":"glavadmin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/functiontranslator.com\/en\/cubeset\/","url":"https:\/\/functiontranslator.com\/en\/cubeset\/","name":"Excel CUBESET Function \u2013 How It Works, Formula Examples and Syntax","isPartOf":{"@id":"https:\/\/functiontranslator.com\/no\/#website"},"datePublished":"2025-07-15T13:34:46+00:00","dateModified":"2021-02-13T11:33:29+00:00","author":{"@id":"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/87663eece497ca58643166ecb09f1389"},"description":"Learn what the Excel CUBESET function does. Clear syntax explanation and useful formula examples.","breadcrumb":{"@id":"https:\/\/functiontranslator.com\/en\/cubeset\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/functiontranslator.com\/en\/cubeset\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/functiontranslator.com\/en\/cubeset\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Function Excel","item":"https:\/\/functiontranslator.com\/en\/"},{"@type":"ListItem","position":2,"name":"Cube","item":"https:\/\/functiontranslator.com\/en\/cube\/"},{"@type":"ListItem","position":3,"name":"CUBESET"}]},{"@type":"WebSite","@id":"https:\/\/functiontranslator.com\/no\/#website","url":"https:\/\/functiontranslator.com\/no\/","name":"Function Translator","description":"Excel function translator","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/functiontranslator.com\/no\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/87663eece497ca58643166ecb09f1389","name":"glavadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/03ccd9347c5339db75deede5a8c5b2bf1d40e0bce26a5251fcaac6331d381db8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/03ccd9347c5339db75deede5a8c5b2bf1d40e0bce26a5251fcaac6331d381db8?s=96&d=mm&r=g","caption":"glavadmin"},"sameAs":["https:\/\/functiontranslator.com"],"url":"https:\/\/functiontranslator.com\/en\/author\/glavadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/functiontranslator.com\/en\/wp-json\/wp\/v2\/posts\/123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/functiontranslator.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/functiontranslator.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/functiontranslator.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/functiontranslator.com\/en\/wp-json\/wp\/v2\/comments?post=123"}],"version-history":[{"count":3,"href":"https:\/\/functiontranslator.com\/en\/wp-json\/wp\/v2\/posts\/123\/revisions"}],"predecessor-version":[{"id":3014,"href":"https:\/\/functiontranslator.com\/en\/wp-json\/wp\/v2\/posts\/123\/revisions\/3014"}],"wp:attachment":[{"href":"https:\/\/functiontranslator.com\/en\/wp-json\/wp\/v2\/media?parent=123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/functiontranslator.com\/en\/wp-json\/wp\/v2\/categories?post=123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/functiontranslator.com\/en\/wp-json\/wp\/v2\/tags?post=123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}