1

I have the following MDX tuple calculation for my KPI in Dashboard Designer:

AVG([Person].[Person].children,[Measures].[Hours])

This works perfectly when, for instance, I view it by Team name.

However, when I view it by the [Person] it's returning no values. Does AVG not work when you're looking directly at the leaf nodes or something? Or is there something else I'm doing wrong?

1 Answer 1

0

OK, so I found AN answer eventually, though I'd quite like a more elegant solution.

What I'm doing is performing an iif statement to check whether there are any [Person].[Person] children available in the current context. If there aren't, then assume we're looking at this by individual [Person].[Person] members and use currentmember instead.

The tuple formula looks like this:

AVG(iif(Count([Person].[Person].children, EXCLUDEEMPTY) = 0, 
    [Person].[Person].currentmember, [Person].[Person].children), 
    [Measures].[Hours])

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