Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mdx , All and All Members differences

Tags:

ssas

mdx

In MDX what is the difference between

[Period].[Period Name].[Period Name].ALLMEMBERS 

and

[Period].[Period Name].ALL

are these statement same?

like image 717
user1254579 Avatar asked Dec 25 '22 23:12

user1254579


2 Answers

ALLMEMBERS is actually a function in the MDX language. This function returns a set of members. Slightly unusual a function being tagged on the end of a string but MDX is unusual.

MSDN reference to this function: https://msdn.microsoft.com/en-us/library/ms144768.aspx

[All] in the context you have given is a single member - the All member. Most hierarchies have one of these members. The most general form of this member I believe is [(All)]. Here is an example of it's use against AdvWrks cube:

SELECT 
  {[Measures].[Internet Sales Amount]} ON 0
 ,[Date].[Calendar].[(All)] ON 1
FROM [Adventure Works];

SELECT 
  {[Measures].[Internet Sales Amount]} ON 0
 ,[Date].[Calendar].[All] ON 1
FROM [Adventure Works];

I think a hierarchies all member can be renamed to something more descriptive such as All Dates in which case you would need to use either [All Dates] or [All]

I previously asked a question specifically about the All member: Is [All] a level aswell as a member

like image 153
whytheq Avatar answered Jan 03 '23 07:01

whytheq


No, they are not. ALLMEMBERS means all axis members, for instance: period1, period2, period3 .., including all periods in 1 member : All

So, [ALL] member means all periods. For example, you can calculate [Measures].[Total Sales] for each date in month or for all dates in month. This the case when you need just [ALL] member to do it

If you want to get just members, without ALL member, you should use: [DimA].[LevelA].Children

like image 27
George Avatar answered Jan 03 '23 07:01

George