Solved

Filtering and MDX Query

Posted on 2001-06-15
3
422 Views
Last Modified: 2012-05-04
I am trying to figure out how to filter an MDX query so it only includes values that are for a certain period of time, eg. year to date, month to date, week to date.

So I have the following dimensions that I am interested in [Store].[Region].[District].[Store], [Time].[Year].[Month].[Week of Month]

Here's the query I have so far:
SELECT
  FROM [Sales Actl To Bdgt]
  WHERE (Measures.[Bdgt Vol Q],
         [Time].[2001],
         [Store].[975].[1577].[1145])

But say for example we are in the time period [Time].[2001].[5].[1] and I only want values included for this time period and prior. The query as it stands returns the values for the entire year of 2001.

Does that make any sense?

If this needs more points, I'll gladly add them.

Thanks
Gary
0
Comment
Question by:garymather
  • 2
3 Comments
 

Author Comment

by:garymather
ID: 6196436
hellooooo. anyone out there?
0
 
LVL 1

Accepted Solution

by:
SYASSIN earned 200 total points
ID: 6204418
I need more info... what is your fiscal year? the same as calendar year?  
Also, is the dimension defined as a time dimension?

have you tried the wtd, ytd, mtd mdx functions?
0
 

Author Comment

by:garymather
ID: 6207067
SYASSIN,

Thanks. You pointed me in the right direction and I eventually figured it out using the PeriodsToDate function. Probably partly my fault for not describing the problem in greater detail and I only increased the points of the question to ellicit a response from someone.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now