Share via

Excel Cube functions.

Anonymous
2024-03-26T10:40:10+00:00

HI

I have this function after I converted a Pivot Table to formulas

=CUBEVALUE("ThisWorkbookDataModel","[Measures].[Sum of Total Stems 2]",{"[Stem_Sales 10].[Year].&[2017]","[Stem_Sales 10].[Week].&[10]","[Stem_Sales 10].[Farm].&[Calenick]","[Stem_Sales 10].[Product DescriptionFF].&[Ayoba® Arctic Ice]"},"[Stem_Sales 10].[stem lengthcm].&[60cm]")

I want to replace the 2017 (&[2017]") to the value in A1.

I have tried a number of concatenate versions, but Excel either says there is a problem with the formula or #NA.

Thank you

Microsoft 365 and Office | Excel | For home | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-04-03T07:10:32+00:00

    Dear Rory

    Thank you for all the help.

    This one worked in the end.

    =CUBEVALUE("ThisWorkbookDataModel",

    CUBEMEMBER("ThisWorkbookDataModel","[Stem_Sales 8].[Year].&["&$A$6&"]"),

    CUBEMEMBER("ThisWorkbookDataModel","[Stem_Sales 8].[Farm].&["&$A$3&"]"),

    CUBEMEMBER("ThisWorkbookDataModel","[Stem_Sales 8].[Product DescriptionFF].&["&$A$4&"]"),

    CUBEMEMBER("ThisWorkbookDataModel","[Stem_Sales 8].[stem lengthcm].&["&$A$5&"]"),

    CUBEMEMBER("ThisWorkbookDataModel","[Stem_Sales 8].[Week].&["&B8&"]"),

    CUBEMEMBER("ThisWorkbookDataModel","[Stem_Sales 8].[Sales Category].&["&$A$2&"]"),

    "[Measures].[Sum of Total Stems]")

    I separated each cubememember, the {} seems to be the problem.

    Regards

    Es

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-03-26T11:12:14+00:00

    Dear Rory

    Thank you for the reply.

    I have tried that version, but the error message "there is a problem with this formula" pops up and if I press ok for this message it highlights [" that is in front of ["&A1&"].

    I typed 2017 in A1

    Was this answer helpful?

    0 comments No comments
  3. Rory Archibald 18,965 Reputation points Volunteer Moderator
    2024-03-26T10:54:30+00:00

    Hi,

    It should just be:

    =CUBEVALUE("ThisWorkbookDataModel","[Measures].[Sum of Total Stems 2]",{"[Stem_Sales 10].[Year].&["&A1&"]","[Stem_Sales 10].[Week].&[10]","[Stem_Sales 10].[Farm].&[Calenick]","[Stem_Sales 10].[Product DescriptionFF].&[Ayoba® Arctic Ice]"},"[Stem_Sales 10].[stem lengthcm].&[60cm]")

    Was this answer helpful?

    0 comments No comments