• 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