Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

MDX Puzzle #5

Writing YTD totals and Running totals using T-SQL can take a little effort.  However, with MDX it's not too difficult.  In this puzzle I will write an MDX statement that produces a monthly YTD or Running total.  Here are the requirements:

Columns:  Monthly Running Total (Calculation), Internet Sales Amount

Rows:  Delivery Date Calendar Month

Filters:  Delivery Date from January 2006 to December 2006

Hints:  You may need to create a scope calculation (WITH MEMBER), use the YTD and SUM functions

Remember, don't post your solution here.  Save them for my solution post.  I will post it along with the steps that was taken to solve this puzzle in a couple of days.  Here is a screen shot of what the results should look like:

image

Don’t forget to check back in a couple days for the solution.

Talk to you soon,

Patrick LeBlanc, SQL Server MVP, MCTS

Founder www.TSQLScripts.com and www.SQLLunch.com.

Visit www.BIDN.com, Bring Business Intelligence to your company.

Comments

No comments.

Leave a Comment

Please register or log in to leave a comment.