+ Reply to Thread
Results 1 to 3 of 3

Cell References in Cube Formulae

  1. #1
    Registered User
    Join Date
    09-17-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Cell References in Cube Formulae

    Hi,

    I'm looking to run a CUBEVALUE formula with member expressions based on the contents of multiple different cells. For this example i have 2 cells with a value for REGION in:

    I15: Border
    I16: Midlands

    I can reference one cell successfully using a cube value formula:
    =CUBEVALUE("PowerPivot Data","[Measures].[Sum of WEIGHTED_IMPRESSIONS]","[pvtBASE].[REGION].&["&I$15&"]")

    Couldn't find a way within CUBEVALUE alone to replicate this result to reference both I15 and I16 so tried with a CUBESET then referencing the CUBESET in a later CUBEVALUE formula:

    FOr the CUBESET, this formula works:

    =CUBESET("PowerPivot Data",{"[pvtBASE].[REGION].&[Midlands]","[pvtBASE].[REGION].&[Border]"})

    This formula works:

    =CUBESET("PowerPivot Data","[pvtBASE].[REGION].&["&I15&"]")

    But for some reason this doesn't:

    =CUBESET("PowerPivot Data",{"[pvtBASE].[REGION].&["&I15&"]","[pvtBASE].[REGION].&["&I16&"]"})


    Does anyone know how to fix the final CUBESET formula or if perhaps there is another way of fitting multiple members and cell references into a CUBEVALUE formula.

    Feels like i'm close but then again I might not be!

    Cheers

    Rab

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Cell References in Cube Formulae

    Just some thoughts, as I don't see anything inherently wrong, but I have not tried to do what you are attempting. The fact that it works when 'hard coded' with Midlands and Border, and even works with a single reference, implies it should work with two references, so I understand your frustration.

    1 - Use 'Evaluate Formula' to see how Excel is interpreting it.
    2 - longshot - add spaces around your &s that are being used for concatenation
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Registered User
    Join Date
    09-17-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Cell References in Cube Formulae

    Thanks Pauley.

    Managed it in the end by converting each value to a CUBEMEMBER then taking a collected CUBESET of those CUBEMEMBERS. Doesn't exactly cut down the formula size but should work..

    Not used Evaluate Formula before; looks useful, will keep that in mind in the future.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formulae or references are breaking
    By Kerry.archambault in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2013, 10:13 AM
  2. [SOLVED] How to identify cells containing formulae with no external references?
    By amaroo460 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-05-2012, 12:52 AM
  3. Cell references in formulae
    By phillb in forum Excel General
    Replies: 8
    Last Post: 03-31-2009, 09:24 AM
  4. Changing cell references in formulae?
    By ChrisMattock in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2008, 12:26 PM
  5. References to worksheets in formulae
    By andyiain in forum Excel General
    Replies: 3
    Last Post: 07-14-2006, 01:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1