SSRS Date parameter - current month from SSAS cube

I have a SSAS cube with a date dimension called Posting Period and now I would like to have my report parameter using this date dimension to show the current month.
So far I have worked out the following expression which are working(Fiscal year calendar going from May to May) for the year component - but I can't figure out how to get it to work on Quarter date part (and the month) so as you can see
the Quarter and month is hardcoded in the below expression:
="[PostingPeriod].[Posting Period].[Year].&[" + CStr(Year(Today())-1) + "].&[Q4].&[10]”
Any help would be appriciated.
Tx

Hi HCMJ,
In your scenario, you use the expression
="[PostingPeriod].[Posting Period].[Year].&[" + CStr(Year(Today())-1) + "].&[Q4].&[10]”
to set the default value of the parameter and then use it in the MDX query, right?
If in this case, you can use the expression below
="[PostingPeriod].[Posting Period].[Year].&[2013].&[Q" & DatePart(DateInterval.Quarter,today()) & "].&[10]”
to set the value on Quarter date part.
And it returns:
If I have anything misunderstood, please point it out and elaborate the meaning of "but I can't figure out how to get it to work on Quarter date part (and the month) so as you can see the Quarter and month is hardcoded
", so that we can make further analysis.
Regards,
Charlie Liao
TechNet Community Support

Similar Messages

  • Formula to subtract current month from previous month

    Hi
    I would like to how to subtract current month from previous month in Crystal 10.  Basically am looking at the variations that between the two month .   I would also like to know the 12 m onth rolling data formula.  Using the same formula, you need to get the difference between the two month.
    Any help on this is very much appreciated.
    Thanks
    Regards
    Cauvery

    Hi Thanks for reponding.
    Though the formula is correct, I don't think it will work out in that way because I have a 12 months rolling data  formula and using this formula  I have to subtract the current month from previous month.
    This the formula that am currently using for 12 months rolling data
    {HPD_HelpDesk.Arrival Time} >= DATEADD ("yyyy", -1, CURRENTDATE)
    Please advise.
    Regards
    Cauvery

  • Variable last date of previous month/last date of current month

    Hello Experts,
    I am facing an issue while designing a query.
    Requirement is like this.
    Report will be run on monthly basis.so on execution of report, it should prompt for month/year.
    now on report there are two columns for which I have to get data on date basis(last date of previous month and Last date of current month).
    Can anyone tell me is there any standard variable for this? what is it?
    or how to achieve this?
    Regards,
    Nirav

    Hi,
    See if this post in this forum can help you.
    Re: Last date of a month
    Regards
    Shalabh Jain

  • ABAP routine for loading data of current month in InfoPackage

    Hello experts,
    I want to load data of current month. Therefore I implemented the following ABAP-Routine for field 0CALDAY in the InfoPackage's data selection:
    data: lv_datum_l like sy-datum,
             lv_datum_h like sy-datum. 
      concatenate sy-datum(6) '01' into lv_datum_l.
      call function 'RP_LAST_DAY_OF_MONTHS'
      exporting
      day_in = sy-datum
      importing
      last_day_of_month = lv_datum_h.
      l_t_range-sign = 'I'.
      l_t_range-option = 'BT'.
      l_t_range-low = lv_datum_l.
      l_t_range-high = lv_datum_h.
    But function 'RP_LAST_DAY_OF_MONTHS' cannot be found!
    Any other suggestions for getting last day of current month?
    regards
    hiza

    Hi,
    Add this code. When u complete execution of this code, ZDATE will have ur month end date.
    data : zdate_c(2) type c,
           zyear_c(4) type c,
           zmonth_c(2) type c.
    data :  zdate like sy-datum.
    data :  zday(2) type n.
    zdate = sy-datum
          zyear_c = zdate(4).
          zmonth_c = zdate+4(2).
          zdate_c = '01'.
          concatenate zyear_c zmonth_c zdate_c into zdate.
          CALL FUNCTION 'FIMA_END_OF_MONTH_DETERMINE'
          EXPORTING
            I_DATE         = zdate
          IMPORTING
            E_DAYS_OF_MONTH = NO_OF_DAYS.
          zday = NO_OF_DAYS.
          concatenate zyear_c zmonth_c zday into zdate.

  • Min date for each month from list

    Hi all,
    I need to select only minimal date for each month from this sample query:
    select date '2011-01-04' as adate from dual union all
    select date '2011-01-05' as adate from dual union all
    select date '2011-01-06' as adate from dual union all
    select date '2011-02-01' as adate from dual union all
    select date '2011-02-02' as adate from dual union all
    select date '2011-02-03' as adate from dual union all
    select date '2011-10-03' as adate from dual union all
    select date '2011-10-04' as adate from dual union all
    select date '2011-10-05' as adate from dual So the result should be:
    04.01.2011
    01.02.2011
    03.10.2011How do I perform it?

    WITH dates
         AS (SELECT DATE '2011-01-04' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-01-05' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-01-06' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-02-01' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-02-02' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-02-03' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-10-03' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-10-04' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-10-05' AS adate FROM DUAL)
    SELECT TO_CHAR (MIN (adate), 'DD.MM.YYYY') adate
      FROM dates
      GROUP BY to_char(adate, 'YYYY.MM')
    ADATE
    03.10.2011
    01.02.2011
    04.01.2011

  • Can i add data for current month only

    can I add data for current month only?

        Knowing your plan options is important marlingut! So that we are able to provide correct information, what make and model phone are you trying to add data too? Is this device already activated on your account?
    Thank You,
    MichelleL_VZW
    VZW Support
    Follow us on Twitter @VZWSUPPORT

  • Last/latest 10 months data ( including current month)

    Hi,  
    I need to find the last/latest 10 months data ( including current month)
    Year
    1/1/2014
    1/2/2014
    1/3/2014
    1/4/2014
    1/5/2014
    1/6/2014
    1/7/2014
    1/8/2014
    1/9/2014
    1/10/2014
    1/11/2014
    1/12/2014
    1/1/2013
    1/2/2013
    1/3/2012
    1/4/2012

    Hi,
    this is my data 
    Year column with Nvarchar datatype. 
    Year
    1/1/2014
    1/2/2014
    1/3/2014
    1/4/2014
    1/5/2014
    1/6/2014
    1/7/2014
    1/8/2014
    1/9/2014
    1/10/2014
    1/11/2014
    1/12/2014
    1/1/2013
    1/2/2013
    1/3/2012
    1/4/2012
    now form this yea) column i need to fetch the latest/last 10 months data only .
    OutpUt for the Query to be:
    Year
    1/3/2014
    1/4/2014
    1/5/2014
    1/6/2014
    1/7/2014
    1/8/2014
    1/9/2014
    1/10/2014
    1/11/2014
    1/12/2014
    Hope this will give you clear picture

  • Slow parameter from SSAS cube

    Hi,
    I've got a SSRS report which use a SSAS cube as source. In the report there are 5 parameters which are build in the Report builder 3.0 using the designer.  The report server is a SQL server 2008 R2 with the latest updates.
    The issue that I am having is when running the report if I would like to choose another value from one of my parameters then I open the parameters (drop-downbox)and select another value in the box - then it's like the drop-down box hangs for 3-4
    seconds when I click out of the box before the value is appearing in the report, when I use the Report builder Tool. If I do the same in IE then the reports render for 10-15 seconds each time a new value is choosen.
    Any Idea how to improve this?
    The Parameter consist of only 5-6 values and it performs very fast if I execute the Query in the designer
    I've attached the Query as it looks like for the parameter(hidden dataset):
    WITH MEMBER [Measures].[ParameterCaption] AS [Company].[Company Name].CURRENTMEMBER.MEMBER_CAPTION MEMBER [Measures].[ParameterValue] AS [Company].[Company Name].CURRENTMEMBER.UNIQUENAME MEMBER [Measures].[ParameterLevel] AS [Company].[Company Name].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Company].[Company Name].ALLMEMBERS ON ROWS FROM ( SELECT ( STRTOSET(@ReportingCurrencyReportingCurrency, CONSTRAINED) ) ON COLUMNS FROM [SALES])
    (the issue is the same for all my parameters)

    Hi HCMJ,
    In your scenario, you said that "the reports render for 10-15 seconds each time a new value is choosen".
    Report server performance is affected by a combination of factors that include hardware, number of concurrent users accessing reports, the amount of data in a report, and output format.
    To find out how long it takes to process a report and which process phase take more time, we can review the report server execution log. We can use the report execution log to find out how often a report is requested, what formats are used the most, and
    how many milliseconds of processing time is spent on each processing phase.
    In addtional, i'd suggest you enable SQL Sever profiler to monitor the queries fired by the report, once you find some queries took a very long time to run, consider creating the smaller cube partition or optimzing the query by adding index or
    partition to improve the query performance.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Deleting Data from SSAS CUBE

    Hello Everyone,
    I have a question, we developed a Basic Cube by building dimensions & Fact from the Source table(Everything in DSV, no Physical DIM and Fact Tables). Now everything goes well.  The Source table will only have CUrrent day data.
    My Question is: Need to delete  particular day data from the cube without disturbing the Existing Data.
    Eg: When I process the data on 31st of March, cube will have only 31st. But when I process 1st , 2nd data CUbe should have 31st +2nd data. 1st Dated data should be deleted from cube,when ever I process the data I just need month end data need to be stored
    with current day data. all the other stuff should be deleted from the cube.
    if I process the Cube on 1st of May, I should only have 31st March, April 30th and May 1st data.
    Hope the Question is clear, please let me know.
    Any help/suggestions would be appreciated.
    Thanks In Advance.
    Thanks, Please Help People When they need..!!! Mark as answered if your problem is solved.

    Hi BKomm,
    I Guess the only way to handle this scenario is by using partitions.
    Create partitions for every last day of months + One additional partition for  current_date.
    your where clause for current_date partition should be somewhat like this
      Where Date = current_date And Date <> Last_Day_of_current_Month
    so that it does not duplicate data for the last day of current month.
    Saurabh Kamath
    Hello Kamat, I was looking for something else inorder to delete the existing data from a cube. But your Approach is far better than making it complex, it did not strike to my mind. Thanks will implement practically and check.
    Thanks Again.
    Thanks, Please Help People When they need..!!! Mark as answered if your problem is solved.

  • Get data for current month in VC from query - Urgent

    Hi all,
    I have designed a query for cube FIAR_C03 for overdue items and query output contains customer, net due date, document date, fiscal year period and amount. I want a chart for that query in VC that only contains those items in which net due date is in current month. How can i do that?
    Where I can place the condition to display only those items in vc in which net due date is in current month and how ?
    Please respond.
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

    Hi Aisha,
    It is possible to do with following steps:
    1. In Query Design make your field 'Net Due' filter with variable for date input (0CALMONTH for example where your date should be this format MMYYYY). Test your query and see if you input a month/year date it would would work;
    2. Build one table from output of your query (choose fields);
    3. In Visual Composer, drag your query into your board and from 'Varaiables' port  (NOT FROM INPUT) drag a line to create a Start point. As soon you realease to create 'Start' a box will ask which fields you want. Choose your date as field;
    4. Select the line between Start point a query. In Input Field assigned the following formula (DSTR(NOW(),'MMYYYY') *
    5. Deploy your model
    at this formula I said: transform NOW(), current date, in Text with format MMYYYY (012002 for example).
    It works!
    Assigned points if was helpful.
    Kind Regards,
    Gilson Teixeira

  • Expression - First date and last date of current month, current year

    Hi
    I need to have 2 ssrs expression as I can use  as default parameters in my report where I can -  out from my Time dimension, get the
    first date of the current, current year - and one where I get last date, current month, current year.
    My data source is a SSAS cube and my timedimension is structured like this:
    [Time].[Days].&[2009-01-16T00:00:00]
    Any suggestions how to solve this ?

    Hi ,
    You can use below in Default Values in ssrs ;
    for first Day of current month and year
    ="[Time].[Days].&[" +Format(dateadd("m",0,dateserial(year(Today),month(Today),1)), "yyyy-MM-dd")+"T00:00:00]"
    output will be ;
    [Time].[Days].&[2014-09-01T00:00:00]
    For last day of current month and year
    ="[Time].[Days].&[" +Format(DateSerial(Year(Now()), Month(Now()), "1").AddMonths(1).AddDays(-1), "yyyy-MM-dd")+"T00:00:00]"
    output will be ;
    [Time].[Days].&[2014-09-30T00:00:00]
    Please correct me if I misunderstood your requirement.
    Thanks
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem.

  • Using FORMAT_STRING from SSAS cube - not working consistently

    Here's the deal.  
    I've got an SSAS cube and I am scoping the format of the measures based on dimension members. 
    Like this.
    scope(( [Account].[Level 5].&[I000900000] )); 
    format_string(This) = "(#,0,);#,0,";   
    end scope; 
    I'm then calling this format in the SSRS report using typical SSRS trickery and hacks.  
    Well. When I run the report for one date (this is a GL financial cube), this works perfectly.  When I run the report for a different date, it all of a sudden doesn't work.  When I view the data in excel through a pivot table, everything is fine.
    It's driving me crazy.  Has anyone else experienced something like this.

    Hi Baracus,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to take last months date to current month date

    Hi,
    I am designing a report wherein the data should range from 12:01am on the 28th day of the previous month to 11:59 pm on the 27th of the current month..  Also this report would be scheduled accordingly and I should  not be able to modify the report every month.  What is the formula that should go into it.
    Any help will be greatly appreciated!
    Thanks & Regards
    Cauvery

    Hi Cauvery,
    try to use the following formula :
    Local DateTimeVar A;
    Local DateTimeVar From_;
    Local DateTimeVar To__;
    A:=today;
    if Month(A)=1
    then From_:=Datetime(year(A),12,28,0,1,0)
    else From_:=Datetime(year(A),Month(A)-1,28,0,1,0);
    To__:=Datetime(year(A),Month(A),27,23,59,0);
    Regards
    Edited by: jeecech on Apr 17, 2009 9:37 AM

  • SSRS - Date Parameter Format

    Hi,
    I have a report where I need to filter values based on dates, so i am using two parameters , From Date and To Date
    I have set the parameter to be Data/time in Parameter Properties -> general tab and Also used an expression to format as mentioned in some of the Forum links for example 
    http://social.technet.microsoft.com/Forums/sqlserver/en-US/2fa790d6-bb28-4e21-8100-fd9ea64ea61b/parameter-date-format-in-ssrs?forum=sqlreportingservices
    i am not getting any error but the format will not change,
    I have already Coverted my datetime values to read as date (yyyy-mm-dd)in the SQL Query but the format in the parameter is still in mm-dd-yyyy format.
    Hope I am not missing something silly and any help will be greatly appreciated.
    Thanks,
    Chaitanya

    Hi,
    Please try below steps:
    Right click dataset -> Properties
    In parameter tabs -> Your Date parameter -> In value of parameter type below expression
    =Format(Parameters!YourDateParameterName.value,"yyyy-MM-dd")

  • How to get current month from BI 7

    Dear Expert,
    I am working on a BI 7 report and I need to restrict a key figure using the current month and previous month.
    Could you help me to find out how to do so?
    Thank you very much!
    Arthur

    if you want to make  2 diff rest key figures.
    check if you have current month variable under cal.month ,  if not create a variable( single, not range ) for current month
    and make a new selection take key fig and rest with current month. 
    and make a new selection and take the key fig and restrict with  current month variable keep off set as -1
    if you want to make only one restricted key fig  which shows both current and previous then.
    create a variable as range and write a exit code from  sy-datum ( take month and year ) as the high value and substract one and make it as low value.
    Hope this helps

Maybe you are looking for

  • Ipod not showing in Itunes and Windows 7

    The Fix I uninstalled everything that was Apple related and reinstalled Itunes with no loss to my data. Once reinstalled, both the ipod is now showing in itunes and everything is working fine now. I hope this helps anyone else out with the same probl

  • National characters in pages, accessed through Application/URl

    Jambo all! I hope you can help me with this little problem: 1. I've created application and added URL item to it 2. URL is pointing to an external ASP page (I hope that fact that this is an ASP page does not influent the behavior) 3. I've published i

  • PS : Revenue on a statistical WBS

    I would like to be able to show revenue from a SD order shown against a statistical WBS element. Can somebody guide me through how I would need to set this up? Thanks, Mark

  • Oracle 8i Enterprise 64 Bits

    Does someone know where can I find an Oracle Enteprise 64 bits version for windows server ? Thanks.

  • Adding JButtons to a Java2d Graphics program

    Hi, I apologise to all you seasoned programmers if this seems an easy question, but I can't seem to see the solution to this one. I'm trying to add 2 JButtons to an existing Java2D graphics program. When I run the program I get the following error, '