Solved

Need to pass parameter today to calculate year to date metric

Posted on 2011-02-27
5
461 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
  • 3
  • 2
5 Comments
 
LVL 21

Expert Comment

by:oleggold
ID: 34993239
0
 
LVL 21

Expert Comment

by:oleggold
ID: 34993243
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

920 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

13 Experts available now in Live!

Get 1:1 Help Now