The Except functionality is of the three Venn Collection functionality's (EXCEPT, INTERSECT, UNION).
Except will give all the members of SET1 which are not in SET2. By default it will remove any duplicates which are in SET1.
The Except functionality is of the three Venn Collection functionality's (EXCEPT, INTERSECT, UNION).
Except will give all the members of SET1 which are not in SET2. By default it will remove any duplicates which are in SET1.
The Cousin functionality will get you the member on same position as the starting based on a new toplevel member. Most of the time you use it in the same way you use ParallelPeriod.
If you look at a date or calendar dimension is might look like this: All ==> Year ==> Semester ==> Quarter ==> Month ==> Date.
If you use a query like this:
The Descendants functionality although in name de reverse of the Ascendants functionality has a lot more options.
Before you read on just a reminder the Geography hierarchy in the Adventure Works sample is: All ==> Country ==> State-Province ==> City ==> Postal Code.
Let’s start with the base:
SELECT Descendants
(
[Geography].[Geography].[Country].&[United States]
) ON ROWS
,
[Measures].[Reseller Order Count] on COLUMNS
FROM [Adventure Works]
Let’s add a second dimension to our query:
SELECT
{
[Measures].[Sales Amount]
} ON COLUMNS
,
NON EMPTY
{
[Date].[Calendar Year].Children
, [Product].[Product Model Lines].Children
}
ON ROWS
FROM
[Adventure Works]
Hmmmm, we get an error:
“Members, tuples or sets must use the same hierarchies in the function.”
According to Wikipedia MDX stands for MultiDimensional eXpressions. It’s a SQL dialect to access OLAP cubes.
So what’s different to “normal” SQL? Basically you don’t have any tables or views, you just have a collection of fact and dimensions.
A fact is the recording of the occurrence of an event: “On July 28th 2014, mrs Jones from 4 Sally Nogging Road, Dun Loaghaire, Ireland, at 10:21 am bought 4 pounds of Ben and Jerry Cooky Dough Ice Cream at mr. Humpries Butcher shop, she was helped by a store clerk called Maria etc… etc…”
A dimension is the description and categorisation of an element related to the fact.”mr. Humpries Butcher shop is owned by mrs. o’Conner, it’s a COOP franchise, it’s located at 12 Dublin Street, Dun Loaghaire, County Dublin, Ireland etc… etc…”
MDX allows you to organize these facts and dimensions in columns and rows.
Is MDX hard to learn? If you have a basic understanding of SQL, MDX is not hard to learn. The mean difference is that you have to start to think in more than two dimensions, but we will get to that later.
For the time being I will do all my posts on this blog against the SSAS 2014 demo cube “Adventure Works”.
Till Next Time.