0

I have been trying to use mdx querying to filter the monthly sales and year to date sales for only the months in 1998

This was my first trial:

WITH 
MEMBER Measures.YTDSales AS
   SUM(
     PERIODSTODATE(
        [Time].Calendar.Year,
        [Time].Calendar.CURRENTMEMBER
     )
     , Measures.[Sales Amount])
SELECT 
{ YTDSales } ON COLUMNS,
[Time].Calendar.Month.MEMBERS ON ROWS
FROM Sales

This is my second trial:

WITH 
MEMBER Measures.YTDSales AS
SUM(
   PERIODSTODATE(
      [Time].Calendar.Year,
      [Time].Calendar.CURRENTMEMBER
   ), 
   Measures.[Sales Amount]
)
SELECT 
{ YTDSales } ON COLUMNS,
([Time].Calendar.Month).MEMBERS ON ROWS
FROM Sales   
WHERE ([Time].[Month Number].&[1]&[1998] )
whytheq
  • 34,466
  • 65
  • 172
  • 267

0 Answers0