|MDX-How do I calculate sales for 12 Month to date?|
|Written by Vidas Matelis|
|Friday, 08 June 2007 02:44|
Q: How do I calculate sales for 12 Month to date in MDX?
A: We have to assume that your date dimension last member represents last month. Then to get last 12 month we can use Lag function. Example:
SELECT [Measures].[Order Count] ON 0
Now to get sum of sales query could be :
- How to install Adventure Works SQL DW and Analysis Services 2005/2008 sample database and project
- MDX-How can I get Last (Previous) Year to Date (YTD) values?
- MDX-How do you calculate monthly average of one year, optionally including empty months?
- How to fix Analysis Services deployment error No mapping between account names and security IDs was done
- What TCP port SQL Server Analysis Services 2005 uses