• subscribe
December 03, 1999 06:11 PM

MDX Puzzle

SQL Server Pro
InstantDoc ID #7723

A common reporting technique is to show a trend line for recent months—for example, a budget vs. forecast report for the last three months. The data is typically loaded into OLAP cubes in increments over time. You have time-dimension members for every month of the year, and only some of the months have data loaded in them. How do you write an MDX query that displays data for the most recent three months that have data?

Using the FoodMart Sales cube, what are the unit sales of the states in the United States for each of the most recent three months that have data?

The FoodMart Sales cube has loaded data only for 1997, so the most recent three months are October, November, and December 1997.



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here
  • SP1?
    I know there is a SP1 for SQL 2008 R2 available....and there is a "feature pack" as well... ...
  • SQL database mirroring
    I have SQL Server 2008 R2 Enterprise 64bit on Windows 2008 R2 Enterprise 64bit.  Each SQL Server has...
  • Dell Compellent Disk Drive
    Does anybody has experience with Dell Compellent Disk Drive? Basically, this system manages all disk...
  • Sql server performance tuning
    I need to find a tool that help me to optimize sql server,queries,improve the performance and solve ...