How to get period date of for a given month from a given date in mdx for SSRS report (mm/dd/yyyy)

I have a situation,  where i need to write expression Period to date(PTD). i want to know how to get the period date. i want you to help in writing Period date or else is there any function to get period date for a given date(the  date is given
from the parameter dynamically) in MDX for SSRS report
ram

Hi ram,
Per my understanding that you want to get the period date based on the month selected and the given date, right?
Could you please provide details information below to help us better understanding your requirements, thus we will be more effective to provide an solution:
What is the format of the period date you want to get, is this date in the DB and you want to filter it based on the month and the given Date?
Did the month and given date are two parameters in the report? if possible, could you please provide some sample data in the DB and also the snapshot of the report structure
I assume you want to get the period date(mm/dd/yyy) between the select month(e.g:Feb) and the given date (10/1/2014) and you should get the date between(02/01/2014-10/1/2014).
If so,and you also have two parameter "Month","EndDate"(EndDate is the given date), please reference to details information below:
You can create an new parameter "BeginDate" (Date/Time) which is the begin date of the period, you can use the expression to get the value based on the value of the month and the year value from the given date,finally hide this parameter:
Specify the available value:
Label:=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value)
Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
Specify the default Value:
Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
Add filter to the dataset as below:
Preview you will get all the date in the given Period:
If you still have any problem, please feel free to ask.
Regards
Vicky Liu

Similar Messages

  • How to get the number of days of a month belonging to a date interval

    Hi, i am getting mad around a problem, i have 2 dates and a month, i wanto to retrieve the number of days belonging to the month that are in the interval.
    eg:
    month january 2011 . begin_date = 11/JAN/2011, END_DATE 30/MAY/2011 result is 21
    month january 2011 . begin_date = 11/DEC/2010, END_DATE 10/JAN/2011 result 10
    month january 2011 .begin_date = 02/FEB/2011 , END_DATE 25/may/2011 result 0
    month january 2011. begin_date = 03/JAN/2011 , END DATE 05/JAN/2011 result 3
    and so on ...
    i appreciate any suggestion
    thank you
    Andrea

    Oh, I didnt see your result.
    SQL> with t as
      2  (select  to_date('11/01/11','dd/mm/yy') from_dt,
      3           to_date('30/05/11','dd/mm/yy') to_dt,
      4           'Jan-11' mnth from dual
      5           union all
      6           select  to_date('11/12/10','dd/mm/yy') from_dt,
      7           to_date('10/01/11','dd/mm/yy') to_dt,
      8           'Jan-11' mnth from dual
      9           union all
    10           select  to_date('02/02/11','dd/mm/yy') from_dt,
    11           to_date('25/05/11','dd/mm/yy') to_dt,
    12           'Jan-11' mnth from dual
    13           union all
    14           select  to_date('03/01/11','dd/mm/yy') from_dt,
    15           to_date('05/01/11','dd/mm/yy') to_dt,
    16           'Jan-11' mnth from dual
    17           )
    18  select from_dt,to_dt,mnth,
    19         greatest(
    20              least(last_day(to_date(mnth,'Mon-yy')),to_dt)
    21              -
    22              greatest(to_date(mnth,'Mon-yy'),from_dt)+1
    23                 ,0) cnt
    24  from t;
    FROM_DT   TO_DT     MNTH          CNT
    11-JAN-11 30-MAY-11 Jan-11         21
    11-DEC-10 10-JAN-11 Jan-11         10
    02-FEB-11 25-MAY-11 Jan-11          0
    03-JAN-11 05-JAN-11 Jan-11          3

  • How to get the first day in the month from a domain date ?

    Hi,
    I like to know how to get the first day in the month from a domain date?
    Thanks
    Stephen

    Hi Gokul...
    Instead of using the funtion module you can just write the 3 statements of code to get the first day of the week.
    Its similar to the above one but instead of writing case statement you can achive the following.
    data : w_res type i,
             w_data type d,
    w_res = w_date mod 7.
    w_date = w_date - w_res.
    write w_date.
    This works.
    Regards,
    Siddarth

  • I upgraded my Firefox and my home page (which I love) is GONE. Not sure how to get it back. I still have my bookmarks though. Thanks in advance for helping me.

    I upgraded my Firefox and my home page (which I love) is GONE. Not sure how to get it back. I still have my bookmarks though. Thanks in advance for helping me.

    If that didn't help then see this article for more suggestions:
    * [[Firefox has just updated tab shows each time you start Firefox]]

  • HT2602 I am stuck. I can not figure out how to get the microsoft office that is on my (admin) profile dock onto the dock for the other users on my mac. Can anyone help me out?

    I am stuck. I can not figure out how to get the microsoft office that is on my (admin) profile dock onto the dock for the other users on my mac. Can anyone help me out?

    ebony --
    So, when you open your main Applications folder, there is no Office app there?
    It's in your Users>Applications folder?

  • How do get rid of the twitter app when there's no trace of it except for update notices on app store and that too with a stranger's id ??

    How do get rid of the twitter app when there's no trace of it except for update notices on app store and that too with a stranger's id ??

    ayk74,
    so you have no idea where some of your installed software originally came from?

  • HT201269 i have got a ipod touch 4th gen and i have got minecraft pocket edition on it but i and getting a new ipod touch 4th gen and i would like to know how to get minecraft back on my new iPod touch with all my data on it??? please help

    i have got a ipod touch 4th gen and i have got minecraft pocket edition on it but i and getting a new ipod touch 4th gen and i would like to know how to get minecraft back on my new iPod touch with all my data on it??? please help

    See:
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device

  • How to get folder(directory path only not file path) from local file system

    Hi Firends,
    How to get folder(directory path only not file path) from local file system , whenevr i will click on browse button.
    Please give reply for this one , if anybody knows.
    Thanks,
    Anderson.

    Hi Anderson,
    if you're using flash.filesystem.FileReference - then it is run in black box - except of filename, size and creation data (and few other properties available after some operation succeeded). This is part of security features in Flash runtime (described in header section):
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference .html
    This for example implies that user can download a content to local machine - but that content cannot be loaded back into Flash runtime. For this you would need either Air runtime flash.filesystem.File:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.h tml
    (so you would created Air runtime based application: desktop or mobile but not web, even as standalone project) or you would need one of 3rd party tools that add file access/file information features to standard Flash runtime applications converted to standalone native applications.
    hth,
    kind regards,
    Peter

  • How to get the number of days in a month?

    hi all
    is there any way to get the number of days in a given month with a given year? for instance, if year is 2004 and the month is July or February, how can i get the number of days? thanks.

    Gee, I don't know ... Maybe this:
    Calendar cal = Calendar.newInstance();
    cal.set(Calendar.YEAR, 2004);
    cal.set(Calendar.MONTH, Calendar.FEBUARY);
    System.out.println("max days in month: " + cal.getActualMaximum(Calendar.DAY_OF_MONTH));
    Do you not bother reading what people have already posted? Read the API docs on the Calendar class.

  • I have lost my "Basic" panel in the Develop module and can't figure out how to get it back. My right panel goes from the Histogram straight to the Tone Curve panel.  My Basic panel should be below the Histogram.  Any ideas how to get it back.  I have even

    I have lost my "Basic" panel in the Develop module and can't figure out how to get it back. My right panel goes from the Histogram straight to the Tone Curve panel.  My Basic panel should be below the Histogram.  Any ideas how to get it back.  I have even uninstalled my lightroom and reinstalled it with same issue.  Help!!!

    Right click on or near one of the other headers and a pop-up will appear and you will be able to select the Basic Panel for viewing.

  • How  to  get the FIRST DAY OF THE CURRENT MONTH

    how to get the FIRST DAY OF THE CURRENT MONTH in oracle 9i.
    plzzzzz send immedaily.advance thanks

    TEST@test SQL> select trunc(sysdate,'MON') from dual;
    TRUNC(SYS
    01-OCT-06
    TEST@test SQL>                                  

  • I bought Photoshop CC for one year for 599 rub/month and today bought CC and Ligtroom for 299 rub/month. How I can stop agreement for 599 rub/month?

    I bought Photoshop CC for one year for 599 rub/month and today bought CC and Ligtroom for 299 rub/month. How I can stop agreement for 599 rub/month?

    Please see Return, cancel, or exchange an Adobe order -
    http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html

  • Does anyone know how to get an ipad to use the wireless network from an airport?

    Does anyone know how to get an Ipad to use the wireless network from an airport express?

    By default, the AirPort Express will broadcast an unsecure wireless network with a Network Name of something like: Apple Network NNNNNN. Your iPad should "see" this network and be able to connect to it. Have you tried going through the iPad's Settings > Wi-Fi > Choose a Network... option. If so, does the AirPort's wireless network appear in the list of available networks?
    Can other wireless devices connect to the AirPort's network?

  • Function Module to Return MM/DD/YYYY after 6 Months from today's Date

    Hi,
    I need to find out the Month/Date/Year, after 6 months from the given Date. Can any one please suggest me a suitable Function Module to get the MM/DD/YYYY after 6 months from current date.
    Appreciate your help!
    Thanks,
    Kannan.

    You can also use :-
    RE_ADD_MONTH_TO_DATE
    Kindly reward in case useful.
    Regards,
    Darshan Mulmule

  • Is it possible to buy photoshop for just a month (From time to time when I need it)? Or do I have to sign up for a year?

    Is it possible to buy photoshop for just a month (From time to time when I need it)? Or do I have to sign up for a year?

    Yes... Cloud Plans https://creative.adobe.com/plans
    -and subscription terms http://www.adobe.com/misc/subscription_terms.html

Maybe you are looking for

  • How to execute sqlplus command in html_db

    The problem for this is caused that we wanna create a Java procedure for host calls on Unix environment, it seems be working on oracle database, and right now we want to use it under html_db, but we can't find any places to be able to execute the fol

  • Reg:Tcode for G/L Account open item clearing

    hi all what is the t code gl account open item clearing. regards jk rao

  • ODI 11.1.1.5 interface failure when loading to Essbase 11.1.2.1

    I just upgraded my ODI env from ODI 11.1.1.3 to ODI 11.1.1.5 and I get the weird java error. All my oracle interfaces are working great but when I try to load essbase interface it fails. I have staging area as Sunopsis_Memory_Engine. Even tried Memor

  • Mixing two company codes

    Hi SAP experts I have few questions related to Amalgamation of two company codes. As per our business decision they want to Amalgamate two company codes 1234 and 5678 , This client has been using SAP since few years. what are the precautions which sh

  • Illustrator CC trial not letting me use Image Trace?

    Hi! I recently downloaded the trial of Illustrator CC to my updated Macbook pro and have come to find that it won't let me use image trace or even pull up any tracing control panels.. I can pull up the tracing workspace but if I try to click "trace i