Report Portal

MDX-Query example that returns list of months from start of year up to specified month

Q: Need a MDX query that returns list of months from start of year up to specified month.

A: You can use YTD function. Following example returns 2003 year members from January to March:

SELECT YTD([Date].[Calendar].[Month].&[2003]&[8])
ON 0
FROM [Sales Summary]

Result:

January 2003 February 2003 March 2003
$1,756,407.01 $2,873,936.93 $2,049,529.87

 

Tags: mdx, faq

 

2007-2015 VidasSoft Systems Inc.