1
votes

I have this mdx query:

with member [Measures].[MemberName1] as '[dequipo.jequipo].CurrentMember.Caption' select NON EMPTY {[Measures].[MemberName1]} ON COLUMNS, Hierarchize(Union({[dequipo.jequipo].[All dequipo.jequipos]}, [dequipo.jequipo].[All dequipo.jequipos].Children)) ON ROWS from [Ctrabajo]

I want the values of the caption field. With this query I have them. however, for the case [dequipo.jequipo].[All dequipo.jequipos] hasnĀ“t got a caption value. It shows "All dequipo.equipo" but i would like to show only ALL or another word like "TODOS"(Spanish word).Any ideas please?

2

2 Answers

0
votes

You would normally set this in the cube designer in Visual Studio.

Open up your dimension, and look in the properties tab for the dimension, there should be an "AttributeAllMemberName" property, set this to whatever you need.

0
votes

You can do this within your custom member declaration. You add an 'IF' statement to see if the member (that the forumla is currently using) is at the top level of the dimension or not.

I cannot check this MDX at present, but I believe you need:
with member [Measures].[MemberName1] as IIF([dequipo.jequipo].CurrentMember.level = 0, 'TODOS', '[dequipo.jequipo].CurrentMember.Caption')

the IIF (immediate if) function has 3 arguments:
1 - true/false test (I check if the level is zero, which means the top)
2 - value to return if true
3 - value to return if false

Sorry that is a bit vague.