Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need to pass parameter today to calculate year to date metric

Posted on 2011-02-27
5
Medium Priority
?
473 Views
Last Modified: 2012-05-11
I need a bar chat and a tablix to display year to date culmulative using a parameter Pmonth and Pdate to limit to Jan 2011 to today for everyday. I used period to date function with level month and member date in SSMS. But i need help to edit this query for SSRS:

WITH

MEMBER [Measures].[year to Date Sales] AS

Aggregate(

PeriodsToDate(

[Date].[Calendar].[Month],

[Date].[Calendar].CurrentMember

),

([Measures].[Sales Amount])

)

SELECT

{

([Measures].[Sales Amount]),

([Measures].[Month to Date Sales])

} ON COLUMNS,

{[Date].[Calendar].[Date].Members} ON ROWS

FROM [Sales Cube]

This query is currently giving me the culmulative for date in all available year but I need parameter that will limit to for example Jan 2002 till 12/31/2002. For example pmonth = jan 2011 and pdate = today e.g 02/27/2011. I need to run this query in SSRS. Thanks
0
Comment
Question by:Projack
[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
  • 3
  • 2
5 Comments
 
LVL 21

Expert Comment

by:oleggold
ID: 34993239
0
 

Accepted Solution

by:
Projack earned 0 total points
ID: 35089046
I am not a notive I am aware of that I just need on the MDX query And resolved it. I pass


WITH

MEMBER [Measures].[year to Date Sales] AS

Aggregate(

PeriodsToDate(

[Date].[Calendar].[Month],
    STRTOMEMBER("[Date].[Calendar].[Date].&[20071125]") : strtomember("[Date].[Calendar].[Date].&[" + Format(Now(), "yyyyMMdd") +"]"),


),

([Measures].[Sales Amount])

)

SELECT

{

([Measures].[Sales Amount]),

([Measures].[Month to Date Sales])

} ON COLUMNS,

{[Date].[Calendar].[Date].Members} ON ROWS

FROM [Sales Cube]

0
 

Author Comment

by:Projack
ID: 35089084
The expert comment was not helpful so I digged around and resolved
0
 

Author Closing Comment

by:Projack
ID: 35126453
The expert comment was not helpful so I digged around and resolved.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

610 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