SSAS



Parallel Period SSAS MDX


The query below returns the member March 2003 which is at the supplied Month level (May 2003) and two prior periods (Fiscal.Month) from the supplied member of May 2003.

SELECT PARALLELPERIOD([Date].[Fiscal].[Month], 2, [Date].[Fiscal].[Month].[May 2003]) ON COLUMNS
FROM [Adventure Works]



Last Child


With Member [Measures].[ThisYearValue] as
([ALL Activity Dates].[All Activity Dates - FY By Months].currentmember.LastChild,[Measures].[Activity Count])
member [Measures].[LastYearValue] as
([ALL Activity Dates].[All Activity Dates - FY By Months].currentmember.LastChild.lag(1),[Measures].[Activity Count])



Top


With
Set setTop10 AS TopCount([ALL Main Specialty].[All Main Specialties - Labels].[Main Specialty Label],10,[Measures].[Activity Count])
MEMBER [MEASURES].[ParameterValue] as [ALL Main Specialty].[All Main Specialties - Labels].CurrentMember.UniqueName

SELECT NON EMPTY {[Measures].[ParameterValue]} on 0, NON EMPTY {setTop10} ON 1
FROM (
  SELECT ( { [ALL Main Specialty].[All Main Specialties - Labels].[Main Specialty Label].AllMembers} -{[ALL Main Specialty].[All Main Specialties - Labels].[Main Specialty Label].&[-- Not Applicable --],[ALL Main Specialty].[All Main Specialties - Labels].[Main Specialty Label].&[-- Not Known --]}) ON COLUMNS
  FROM [SEM ALL] )
  
  
  

No comments:

Post a Comment