?
Solved

Filtering and MDX Query

Posted on 2001-06-15
3
Medium Priority
?
437 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

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

Accepted Solution

by:
SYASSIN earned 400 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

649 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