1

I have an Account dimension in my cube, and a custom aggregate that takes my CAD measure and divide it depending on what account it is.

Now, I need to add another measure to the cube called USD, and depending on the measure the user is looking at in the pivot table, I need to use either CAD or USD for the Custom rollup calculation.

I'm hoping something like

IIF([Measures].CurrentMember.Name = "CAD", [Measures].[CAD] / xxx, [Measures].[USD] / xxx)

would work, but I haven't tested it yet because I don't know a very good way to debug it without changing my underlying tables and reprocessing the entire cube (which takes quite a while).

The platform I'm using is SSAS 2008R2.

Please give me some pointers for solving this issue. Thanks!

Edit: The MSDN site says:

When a dimension contains only a single visible hierarchy, the hierarchy can be referred to either by the dimension name or by the hierarchy name, because the dimension name is resolved to its only visible hierarchy. For example, Measures.CurrentMember is a valid MDX expression because it resolves to the only hierarchy in the Measures dimension.

I believe then that the expression I gave above will not work, as [Measures] in this case points to the Account dimension hierarchy.

1
  • I think your suggested use of IIF will work. Why can't you try it? Sep 11, 2012 at 20:08

1 Answer 1

2

I believe then that the expression I gave above will not work, as [Measures] in this case points to the Account dimension hierarchy.

Nope : [Measures] is and will always refer to the only [Measures] dimension in your cube.

If you want to access the current [Account] member, then use [Account].CurrentMember (and add possibly the hierarchy if more than one); but from your question, it is not clear which issue you're trying to solve.

1
  • Ah, I re-read the statement, and it makes sense now. Yes, I wanted the [Measures] dimension. Sep 11, 2012 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.