Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Excel 2010 cubeformula MDX syntax: how to get all members at a certain level of an AS cube hierarchy?

$
0
0

I have a cube hierarchy that has full path

[Location].[Location Hierarchy].[Department].&[DEPT 07].&[East].&[Manager].&[site code]

I can return the full hierarchy using something like

[Location].[Location Hierarchy].[All]

However, I want to return everything ([All]) at a lower level of the hierarchy. For example,

[Location].[Location Hierarchy].[Department].&[DEPT 07].&[All]

To get everything in Dept 07.

Of course your first response would be - just use the same statement without ALL

[Location].[Location Hierarchy].[Department].&[DEPT 07]

but the problem is I want to use a lookup cell that allows the user to select All, East, or West

=Cubemember("MyCube","[Location].[Location Hierarchy].[Department].&[DEPT 07].&[" & B1 & "]")

And that works for East and West, but not All, because I can't just append [All]  partway down a hierarchy to get everything underneath (at least as far as I can tell).

Can anyone throw me a hint on how to accomplish a dynamic cubemember formula that includes/allows an All option?

I even tried embedding the cubeformula in an IF statement (If B2="All", Cubemember(formula1), Cubemember(formula2)) but Excel didn't like that either.

Thanks for any help!!


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>