Current Year in Prompt

Hi,
How to show current year in week prompt in sql request as dufault value
thanks
Edited by: 896398 on May 7, 2012 7:59 PM

Hi,
when you creating prompt under show label select 'SQL Results' and write the below code to choose year from week columns
SELECT YEAR(week_column) FROM SubjectArea
after that come to Default to label-> SQL Results and write the below code to show current year as a default value.
SELECT MAX(YEAR(week_column)) FROM SubjectArea
Note: Replace week_column and subjectArea with your column name and subject area name respectively.
Hope it helps!
Regards,
Pandian

Similar Messages

  • How to show current year and last year sales in a WEBI Report

    Hi Guys
    How can show current YEar Sales in one column and Last YEar Sales in the other column based on a user prompt for the Current YEar Column.
    For Example is user enter 2010 for Year how can i show a Column for Sales-2010 and Sales 2009.
    Thanks

    If you can modify your Universe add an object named New Object Last Year whose SQL is:( yourTableName.Year + 1)
    Then in WebI create two distinct queries in your query Pane. In the first one you could do this:
    Query 1:
    objects: Year, Sales ... etc.
    filters:   Year Equal to '1. Prompt Year'
    Query 2:
    objects: Year, Sales ... etc.
    filters:    New Object Last Year Equal to '1.Prompt Year'
    Then in your report you can drag each object on their respective columns.
    If you don't want to use two distinct queries, use one like this:
    Query 1:
    objects: Year, Sales ... etc.
    filters:        Year Equal to '1. Prompt Year'
                 Or
                      New Object Last Year Equal to '1.Prompt Year'
    Edited by: PadawanGirl on Jun 23, 2011 6:28 PM

  • How to display results of a report based on current year

    Hi,
    Please advice me for the following requirement.
    I have a report which is having sales results, which is having year column also. Report has to be displayed based on the current year. Now it is 2013. I should show current year results only i.e 2013.
    In 2014, i should show only 2014 results. How to achieve this at a report level.
    regards
    CK.

    Hi CK,
    You are having Data for 2014 also. If not means, you can use sql query select max(year) from period.
    So it will show the final maximum end of the year(2013) from database.
    You can use dashboard prompts too. in the prompt also you can have specific year or sql query
    http://mkashu.blogspot.com
    Regards,
    VG

  • OBIEE 11g - Current year date and the same date in Previous year

    Hi Experts,
    I have an attribute say RECEIPT NO, i want to display the "No of Receipts" i.e(count(receipt no)) for any given date in the current year as well as for the same date in previous year.
    Please suggest me how to achieve this in 11g.
    Thanks

    Hi Veeravalli,
    Thanks for your prompt help.
    Could you please ellobarate this. I have to display the count(receipt_no) for the last year same date.
    Thanks

  • Filter measure column for current year

    Hi,
    I'm stuck up with issue, we have a report from three tables D1, D2 and F1. In which D1 is time dimension. Now we have report from D2 and F1 with measures, and the report is placed in Dashboard which is having year prompt.
    F1 is joined with D2 and D1 Time dimension as well, the requirement is in the report one of the measure column say X should always show the values for current year, while others will show according to prompt values.. In short I want to display one of the measure column for current year, even though the user selects the prompt value for year earlier to it the values should not change.
    Please let me know, how to achieve this.
    Thanks in advance

    I think you can still solve this.
    Whatever Srini said keep it.
    Now for the date prompt create a presentation variable.
    pass this presentation variable in the expression for measure which you don't want the current year.
    case d1.year=@{presentationvarialbe} then sum(f1.x) else 0 end
    you can also use the filter expression too.
    remove year prompt filter from the report. and then add a new filter for the measure as<>0.

  • MDX syntax for current year in a Pre-defined condition

    Hi,
    I'm looking for assistance in building a Pre-defined condition in a universe based on an MSAS 2005 OLAP cube, that only returns the current year.
    My year is defined as [Time Accounting].[Accounting].[Accounting Year]
    I can create a Pre-defined filter that accepts a constant value as follows:
    <FILTER KEY="[Time Accounting].[Accounting].[Accounting Year]">
         <CONDITION OPERATORCONDITION="Equal">
              <CONSTANT CAPTION="2008"/>
         </CONDITION>
    </FILTER>
    and it works fine, however, I would like to make it dynamic.
    There is an attribute called current year that is defined as [Time Accounting].[Accounting Year].[Accounting Year].[Current Year].[Value] but when I try and put this into my pre-defined filter nothing is returned:
    <FILTER KEY="[Time Accounting].[Accounting].[Accounting Year]">
         <CONDITION OPERATORCONDITION="Equal">
              <CONSTANT CAPTION="[Time Accounting].[Accounting Year].[Accounting Year].[Current Year].[Value]"/>
         </CONDITION>
    </FILTER>
    Is this possible? What am I doing wrong?
    What I'm ultimately aiming for is a rolling 12 month condition.
    Thanks,
    Colin

    Hi,
    In OLAP universe, you cannot define a filter with CAPTION = another universe object.
    What you can do is CAPTION = String or CAPTION = @Prompt.
    By the way, if you want to achieve what you are requiring, I suggest you create a calculate expression such as:
    <EXPRESSION>
    IIF([Time Accounting].[Accounting Year.].CurrentMember.Properties("Name") = [Time Accounting].[Accounting Year.].CurrentMember.Properties("Current Year"), 1, 0)
    </EXPRESSION>
    Then you can define your filter on your new calculated expression and the operator to Equal and CAPTION = 1
    Didier

  • Narrative view current year

    Hi..
    How could I view the current year by default in narrative view. I have used the following code
    Year @{pvYear}*{year(current_year)*
    Here pvYear is my presentation variable. At first time it shows Year year(current_year) in my report. When I use the prompt its shows my selected year.
    Right now I have hard coded as
    Year @{pvYear}{2009}
    Thanks
    Mohan

    These are the step you have to follow
    create one dummy column in the report and write the following formula
    *case when @{year}=null then year(current_date) else @{year} end* and refer that column in the narrative view
    and in the dashboar prompt defualt to drop down select repository variable and give the current year repository variable there
    or choose SQL results and write the following formula
    * SELECT case when 1=0 then "- Actual Start Date"."Start Year" else Year(current_date) end FROM Activities*
    hope it helps you
    Regards
    Naresh

  • Variable Report Filter (Current Year)

    Dear Gurus,
    I need a report which always will work with current year measure. (Without asking to user in selection screen) The system should automatically assign the current year. I created an object in universe. In definition tab, in the select statement I wrote   to_char(sysdate,'yyyy') . But, in report and while the system gives an error message like "Parse failed. Exception: DBD, The supplied XML is not valid. to_char(sysdate, 'yyyy')State: N/A".  I think the formula is wrong but I wrote it by referencing OSS note 1381486. Are there any suggestion? Thank you.

    Hi,
    This should have been posted in the designer section, but...
    I think I know why you are having problems getting a right answer, the parse failed message says:
    The supplied XML is not valid.
    Which leads me to believe you are using an OLAP universe (on top of BW may be?), all the solutions given here are for SQL access.
    Unfortunately, there is no string handling possible in an OLAP universe on top of BW, you would have to resort to solving this in the underlying BEx query for this universe.
    You can think along the lines of using a BEx variable that is input ready, takes multiple values, is mandatory and has a default value filled with by a user exit (which makes it default to current year).
    You can show the prompt message of the BEx variable for when the user wants to select different year(s).
    Not showing the prompt and leaving it empty will trigger the default.
    Good luck,
    Marianne

  • 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.

  • SSRS Matrix report. Variance expression by Month. Need to compare month from prior year to current month of current year VS2010

    Please help.  I have a matrix report.  In the report I have row group  PO Type.  One the Column groups I have a parent group by Fiscal Year, and then a child group by Month.  When I run the report, I get two years of data back broken
    out by month.  Please see below.
    Now here is where I am getting stuck.  I need to take the variance between the current month of the current year, from the same month of the prior year.  So I need to show the difference between Oct , 2014 from Oct, 2013. November, 2014 from November
    2013... etc. etc.
    In the example below, how do I create a column or row showing the variance for Contracts for October 2014.  I need to take the contracts for October 2014 which is 3 and subtract that from October 2013 which is 8.  Any suggestions? How do I do that
    for each month?  Then I need to do it for the quarter... then the year?  But I'll be happy if I can just get the month working first.
    Any help will be appreciated. 
    here is what my rdl file looks like.
    Here is what my report looks like when I render it.

    Hi Adrian_s2012,
    According to your description, you want to compare values for the month of current year with the month of prior year and get the variance. Right?
    In Reporting Services, we don't have any function to get this "Year to Year" Growth. In this scenario, if you data source is a cube, we suggest you use Analysis Services to achieve your requirement. If this data source is just from database, it will be hardly
    to calculate the variance because we need to compare the values within every two different column group and matrix generate adjacent columns one by one. Even we make it by using custom, every time executing the long code when generating result
    in a cell will reduce a lot of performance, we really don't suggest to do that in SSRS. Here is a thread with much easier requirement, please take a reference of that:
    http://social.msdn.microsoft.com/Forums/office/en-US/842e2dcb-d949-4297-9d91-eac989692cb5/difference-between-the-grouped-column?forum=sqlreportingservices
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Fixed Asset: Current Year Depreciation

    Dear Experts,
    Previously, fixed assets was managed manually in an excel sheet and depreciation was calculated manually in the excel sheet.
    My client wants to start using the FA Addon in March. I managed to import all the fixed asset master data with its Cost, Acc. Depn and NBV. They all tally with the GL balances as at 31.12.2010 which is the last day of the accounting year.
    However, I have problem with the current year accumulated depn figure. When I run depreciation for Jan-Feb, the figure does not tally with the GL balances as at 28.02.2011.
    For example:
    Fixed Asset Cost: $5,859.00
    In SAP B1
    Depreciation method: Straight-line depreciation
    Calculation medthod: Percentage of Acquisition Value
    Percentage: 33.33%
    Planned monthly depreciation: $162.77  <-- Not sure how B1 get this figure
    Therefore, accumulated depreciation for current year as at 28.02.2011 = $325.54
    Manual via Excel
    Depreciation method: Straight-line depreciation
    Calculation medthod: Percentage of Acquisition Value
    Percentage: 33.33%
    Accumulated depreciation for current year as at 28.02.2011=  ($5,859 x 33.33%) / 12 x 2 = $325.47 
    How do I get the current year depreciation to tie with the GL?

    Hi Joyce,
    I understand the issue you are facing is that
    accumulated depreciation for current year as at 28.02.2011(calculated by Fixed assets addon) = $325.54,
    but
    accumulated depreciation for current year as at 28.02.2011(calculated by excel)= ($5,859 x 33.33%) / 12 x 2 = $325.47
    you want to know how system calculate the accumulated depreciation as $325.54?
    in order to make it clear,
    please let me know how did you define the FA master data,such as the net book value,useful life,remaing life and so on.
    Please check the FA master data->general tab and calculation tab,as it is not possible to attach the screenshot to show the relevant data,please log a SAP message for the further assistance.
    Kind regards,
    Eleven

  • How can we import Fixed asset of the current year ?

    Hi ,
    in 1272578 note , SAP Support explain that's it's not possible to create fixed asset of the current year( example = acquisition date = 2009-02-01 )  using import , but they gave no workaround .
    does it mean that we have to manually create all assets of the current year ? or there is another way ( using DI-API for example ) ?
    Thanks

    Good day
    The fixed asset master data import functionality in SAP Business One is used to import assets of the previous year. If you are to force the importation of current year assets some of them might load but system will not be able to calculate planned depreciation for that year, which will give u problems when u try to run depreciation forcing u to post manual depreciation.
    With manual depreciation will not look good on the Fixed Asset Master since it sort of duplicate depreciation ONLY on the Master your report will be fine.
    Capturing Current year assets manually will be the safer road.
    Thanks
    Louis

  • Asset Revaluation issue - Reval of Current year depreciation

    Hi All,
    We are setting up the system to do asset revaluation for our company code in South America. My client wants to
    revalue the assets from Jul'09 to Dec'09.
    1) We have maintained inflation indexes for the last day of each period in the year 2009.
    2) Maintained Posting Variants and Time Base and Exposure variant accordingly for all the periods and year as 9999.
    3) Assigned the appropriate Time base and exposure variant in the period control method.
    4) Maintained the Revaluation Areas:
    a) Area 01 - Book
    b) Area 02 - Inflation Adj (Revaluation Area)
    c) Area 03 - Derived (Area 01+Area02)
    d) Area 22 - Infla Adj in Group Currency
    5) Maintained the Revaluation key and assigned it to the relevant Asset classes by Depreciation Area (02 and 22)
    6) Maintained the transaction types as below:
    897 - Revaluation (downward) current year
    892 - Revaluation (upward) current year
    891 - Revaluation (downward) prior year
    893 - Revaluation (upward) prior year
    7) Maintained the Inflation Method and last revaluation date on Inflation method as 01.07.2009.
    8) We have also activated the Revaluation after useful life.
    With this setup in the system I took a test asset which had depreciation postings for the period 08 and 09. When I
    ran the J1AI - Revaluation (Inflation) Program in the test run mode the outcome was that the APC value of the asset
    was being revalued and Revaluation of Prior year Depreciation but not the Revaluation of current year
    Depreciation. Can anyone tell me why current year Depreciation is not being revalued.
    Am I doing something wrong process-wise or configuration-wise?
    Please help me in resolving this issue.
    Regards,
    Raj

    Hi Rajesh Phanibatla,
    I've always happened that Issue. But what I realized is that although the program output (J1AI) does not show you nothing on "Rev of CY Depn", the system calculates. This only happens for the first month of adjustment (In your case, Aug 08).
    Try checking the test asset with the Assets Explorer (AW01N) just after running the adjust (J1AI) in background process (NO test mode) at 31.08.2009. See if the area Area 02 - Inflation Adj (Revaluation Area) on "Posted values" tab shows something different to zero on month 08 with "Planned" status.
    Then, for the adjustment of the following months, the output of the program will show you the "Rev of CY Depn" value.
    If you want, let me know your email to show you a presentation (PowerPoint in spanish) that has screens that I captured on that occasion that happened to me.
    I hope this is your case and can help you that I said.
    Good Look!
    PD: Sorry for my bad english :S

  • Current Year and current month?simple question

    How can i get four Digit current Year and two digit current month. So if is march it should get me as 03 and the Year as 2002. Please do help me, is a simple question isn't it ?. Thanks for your earliest response.
    Thank you.

    i have a directory structre of the format
    REPTS2000209/E200209-98000001
    in which 2002 is current YEAR
    09 is current month
    and 9800001 is the code i would submit(list box) from a form
    so what i need is a program that can generate the above path and open that particular PDF file
    so basically E200209-98000001.pdf is the PDF file.
    i am submitting it from JSP page. PLEASE HELP ME how can i program.

  • Parameter for current year and previous year

    Hi all,
    I currently have 2 reports where the query is the same except in the where clause I have it filtered to current year and previous year based on the List_Date. I would like to make this one report with a parameter of Current or Previous year.
    Would I create 2 more datasets one for current and another for previous? I would think there is a easier way. Any help or direction would be great.  

    If you define a parameter in SSRS, you can use it's value in your query. Just make sure the parameter name, and CASE (SSRS is case sensitive when it comes to parameters) are the same in SSRS and your query. There's a parameter tab on the dataset properties.
    It SHOULD auto fill, but it never hurts to check, just in case.
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.
    Yes it did auto fill the parameter tab in the dataset and I get a parameter to enter the year when I preview the report. Still a little confused on how I do current or previous year. Are the next steps what I need to do?
    @yearParam parameter:
    1) Create  Available or Default values 
    2) Current and Previous year as label
    3) For Value do I need to use a expression for current year =Year(now()) and previous Year?
    4) Add a filter on the tablix for list_date?

Maybe you are looking for