Solved

Filtering and MDX Query

Posted on 2001-06-15
3
425 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how the fundamental information of how to create a table.

831 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