Solved

Need to pass parameter today to calculate year to date metric

Posted on 2011-02-27
5
465 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
 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem with data displaying 2 29
ssrs - cannot save to pdf or excel from Report Manager 1 55
SSRS Report 2 52
ajaxSubmit is giving me an error 1 54
PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

726 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