You are a business analyst for a retail company that uses a Microsoft SQL Server Analysis Services (SSAS) multidimensional database for reporting. The database contains the following objects:
You must create a report that shows, for each month, the Internet sales for that month and the total Internet sales for the calendar year up to and including the current month.
You create the following MDX statement (Line numbers are included for reference only.):
You need to complete the MDX statement to return data for the report.
Which MDX segment should you use in line 01?
The following example returns the sum of the Measures. [Order Quantity] member, aggregated over the first eight months of calendar year 2003 that are contained in the Date dimension, from the Adventure Works cube.
Copy
WITH MEMBER [Date].[Calendar].[First8Months2003] AS
Aggregate(
PeriodsToDate(
[Date].[Calendar].[Calendar Year],
[Date].[Calendar].[Month].[August 2003]
)
)
SELECT
[Date].[Calendar].[First8Months2003] ON COLUMNS,
[Product].[Category].Children ON ROWS
FROM
[Adventure Works]
WHERE
[Measures].[Order Quantity]
References:https://docs.microsoft.com/en-us/sql/mdx/aggregate-mdx
Currently there are no comments in this discussion, be the first to comment!