Default value in dashboard prompt

Hi,
I have created 2 dashboard prompt one is projectnumber another one is date which is in 'MON-YYYY' format.
My requirement is date prompt default value one month before a current month.
Example if it is February 2012 it must displayed as JAN-2012
Thanks in advance.

Hi RR,
Edit the Prompt.
Under Default Selection select SQL Result and place the following query:
SELECT concat(upper(CAST (MONTHname( TIMESTAMPADD(SQL_TSI_MONTH,-1, CURRENT_DATE)) AS CHAR(3))),concat('-',cast( YEAR( TIMESTAMPADD(SQL_TSI_MONTH,-1, CURRENT_DATE)) as char)))
FROM "OBIA"
Try this.. I think it will solve your issue.

Similar Messages

  • Using a Sql Result in Default Value of Dashboard Prompt

    Hi,
    I Create a Dashboard Prompt, this have two dates, the initial and the last for a period to filter. I need to set the default value in the fist and last date of the previous month, for example, if today is 20th of november the default value of initial date has been 1th of October and the last date has been 31th of october.
    I used in default the option 'SQL Results' and use the next sentences:
    SELECT TRUNC(add_months(sysdate, -1), 'MM') FROM dual;
    SELECT TRUNC(last_day(add_months(sysdate, -1))) from dual;
    But when I try to use the dashboard prompt the result is:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <(>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: SELECT TRUNC(add_months(sysdate,-1),'MM') FROM dual
    When I try to use only select sysdate from dual; the result is:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27004] Unresolved table: "dual". (HY000)
    Thanks for your help.

    Thanks for your help. Finally I solve this issue of
    this form:
    1. I Create a Initialization Block with the next
    sentences:
    SELECT TRUNC(add_months(sysdate, -1), 'MM')
    INITIAL_DATE ,TRUNC(last_day(add_months(sysdate,
    -1))) END_DATE, To_char(TRUNC(add_months(sysdate,
    -1), 'MM'), 'YYYYMM') PERIOD FROM dual;
    2. Then I Create three Repository Variables and
    assign the Initialization Block to this
    3. In the Dashboard Prompt I use the "Server
    Variable" Option in the default and call the three
    variables.
    Thanks again
    EdwinHi: How u access server variable with two fields of date. Actually, I am doing the same work. But I can not do this work. Because this is ok when the date is greater than or less than. When i use between, in default server variable button did not show any text area for reoository variable. I also made initailization block with 2 fields.
    My Task is, I have to initialize the one date coloumn. From Date: and To Date. Pluzz help me in section
    Ali Haroon Nawaz

  • How to set the default value in dashboard prompt?

    Hi there,
    In my Dashboard prompt I'm getting values like:
    Mar 2010
    Apr 2010
    May 2010
    Jun 2010
    How to set the default value to the current month (Jun 2010). I don't want to use "specific value". I want to use the "SQL Result" for populating the default value.
    Appreciate your help

    hi,
    you can create a Repository variable current_month with the expression as
    select to_char(trunc(sysdate),'Mon')from dual
    and use this in the prompt "Default to" Server variable and use this repository variable.
    hope this helps.
    cheers,
    vineeth

  • How to pass values to dashboard prompts from external applications

    Any idea is well appreciated.
    How can I pass values of dashboard prompts from external applications to the dashboard prompts so that the dashboard is prefiltered based on values sent by external applications.
    Thanks in Advance!
    Kris

    Kris,
    i am able to change the session variable and able to call the dashboard from external app, but i identified prompt value not changing. but Finally i am able to found a workaround for you.
    Use the following URL and it explained here
    http://localhost:9704/analytics/saw.dll?Dashboard&nquser=Administrator&nqpassword=Administrator&PortalPath=/shared/abcd/_portal/dash1&Options=rmf&DSN=madan
    PortalPath is your dashboard location. /shared/abcd is folder where i saved dashboards. dash1 is my dashboard name.
    internally this dashboard includes many reports that uses the session variable. after doing above this i am able to update the session variable to the value i have given in URL, DSN=value.
    You may observer here that calls the dashboard and passes the value but its not updating the prompt value. so workaround for this is edit your prompt,
    change the Default to - SQL Results and place the sql
    SELECT CASE WHEN 1=0 THEN Markets.Region ELSE VALUEOF(NQ_SESSION.DSN) END saw_0 FROM Paint
    again here Market.Region is column from presentation layer and Paint is subject area. After doing this step, your prompt always shows value in the session varible as default.
    Now include reports and dashboard prompt in the dashboard and run this url from external applicaitons.
    http://localhost:9704/analytics/saw.dll?Dashboard&nquser=Administrator&nqpassword=Administrator&PortalPath=/shared/abcd/_portal/dash1&Options=rmf&DSN=madan
    it worked for me and blog this soon. if it works for you mark the question as answered and mark my replies as correct.
    thanks
    - Madan

  • Default width for dashboard prompts

    Hi:
    Does anyone know how to set the default width for dashboard prompts? Is there an XML file that contains this value?
    Thanks.

    During creation of prompts you can set additional format just check available icon on that layout. If it is 10g just look at above the heading 'Dashboard Prompt'.
    Pls mark correct/helpful if helps

  • Constraining Values in Dashboard Prompts

    Hi,
    I have a question about constraining values in dashboard prompts. Do all fields need to come from the same table as I am finding constraining values is not working where I am selecting some values from different tables:
    For example
    Start Date - Fact Table
    End Date - Fact Table
    Salesperson - Org Dim
    Market - Org Dim
    Introducer - Org Dim
    Customer - Org Dim
    I am trying to constrain values beginning from Salesperson and so on but this does not work.
    Is this the expected behaviour? should all values be retrieved from the same table in order for this to work?
    Thanks

    Hi,
    Below is the filter I am applying in the report:
    "Agreement Fact"."Prop Creation Date" >= Evaluate('to_date(%1,%2)','@{startdate}','YYYY-MM-DD HH24:MI:SS')
    and "Agreement Fact"."Prop Creation Date2" <= Evaluate('to_date(%1,%2)','@{enddate}','YYYY-MM-DD HH24:MI:SS')
    and Organisation.Market = '@{market}'
    and Organisation."Sales Person Name" = '@{salesperson}'
    and Organisation."Introducer Name" = '@{introducer}'
    and Organisation."Customer Name" = '@{customer}'
    I have selected constrain in the report from salesperson onwards but instead when I run the dashboard report the values beginning with salesperson do not show.
    I definitely know that data exists for the date parameters(startdate and enddate) and market parameter. I have run a report in answers using the same parameters as in dashboard and do see data.
    Can anyone help?
    Thanks
    Edited by: sliderrules on 14-Mar-2011 05:57

  • How to pass current month as the default value in the prompt

    Hi,
    Could you please tell me how to pass the current month as the default value in the prompt.
    I have a report where month is a prompt. By Default it should ahve current month as the default value along with other months.
    Please let me know the syntax for the same.
    Thanks in advance!!
    Regards
    Sindhu

    Hi,
    what datasource do you have? Is it SAP BW or something else?

  • Passing Values to Dashboard Prompt

    Hi Gurus,
    I have a summary Dashboard page with summary report and prompt build on Summary table , and i have a detail dashboard page contains Detail report and prompt same as Summary but these prompts are from Dimension tables and report from fact and Dimension.
    The requirement is Once i click some value in Summary dashboard it has to pass the values to Detail dashboard ( Means Passing the values to Dashboard prompt) and show the result in detail.
    As i cant use the OBIEE navigation logic to pass the values as prompts columns are not from same table. So i thought to use the GO URL this also i cant use as i am using Pivot table in Summary report. I thought to use Summary prompt in the detail Dashboard and create a dummy reports based on the prompt and resultant value pass to the Detail reports. I am able get the values but i am not getting proper answer. I dont no why .
    Is i am doing correct ? i know its not elegant way. If some one give me tip or direction that will be great help.
    Thanks in advance.
    Regards
    Ali

    If you are attempting to pass a value from one table1.column1 to another table2.column2 where the two do not match then you will need to use a presentation variable to hold the value. You can populate the variable using a hidden dashboard prompt that has the table1.table2 and read the value into a variable. You can then use this variable to filter the table2.column2

  • How to Get Default Dates in Dashboard Prompts

    i just want to select two dates by default on the Dashboard prompts.
    Those two dates would be last day of the last quarter and last day of this quarter.
    Any body please give me the select statement to pick those two dates(last day of last quarter and last day of current quarter)by default on the dashboard prompts?
    Thanks in Advance

    If you just want it once, then in the dashboard prompt "Default to" window, select "SQL Results" and enter this:
    SELECT CASE WHEN 1=0 THEN table.column ELSE TIMESTAMPADD(SQL_TSI_QUARTER,0, TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE)) END FROM "subject area"
    UNION
    SELECT CASE WHEN 1=0 THEN table.column ELSE TIMESTAMPADD(SQL_TSI_QUARTER,1,TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE)) END FROM "subject area" This will give as the default, the last day of the last quarter and the last day of the current quarter in your multi-select prompt.
    Edited by: David_T on Apr 26, 2011 12:12 PM

  • Hide values on dashboard prompt and set defaults

    I have a prompt with 3 values,
    1) Year-Qtr
    2) Year-Qtr Start Date
    3) Year-Qtr End Date
    2 and 3 are constrained based off of what is in the Year-Qtr drop down. How can I get 2 and 3 to automatically have the values set and also be hidden to the user.
    Is this possible?

    Check this thread out for different ways of hiding dashboard prompts which is already posted in our forums:
    Hide dashboard prompts
    And regarding the populating the default values based on the value selected in the other prompt is not possible. The default value will always be a hardcoded vaule which can be in the form of presentation variable or sql results or an expression.
    Hope it helps
    Thanks
    Prash

  • How to set Default to in Dashboard Prompt from presentation variable value

    Hi all BI Gurus,
    I am trying to come out from my problem from last two days and I am not able to find the solution.
    Here is my problem.
    I am having two dashboard pages in one dashboard. Both pages contains dashboard prompt. Now from the first page’s prompt I had set a presentation variable and I want to use that presentation variable’s value in to prompt’ s default value which is used in my second dashboard page.
    I am hoping I can do that with Server variable or variable expression, but don’t know the proper way. I tried a lot with both but not able to find the solution.
    Could any help me please?
    Regards,

    Hi David,
    Thanks for replying. I really appreciate it.
    Yes I am using the same column.
    Let me provide you more details regarding my problem,
    I am having one dashboard prompt for gender and it's default value is 'Female' so I am assigning that value in to presentation variable PV_GENDER with set variable option in prompt.
    Now in my second prompt which I am using on second page of same dashboard, I am trying to assign that value 'Female' ( or the one that user had selected ) with the help or that presentation variable PV_GENDER in Default to. I tried all options (e.g. Variable Expression, Server Variable, SQL Result ) but I am not able to get that value.
    If you need more detail just let me know.
    Once again thanks for replying.

  • Problem showing constrained values in dashboard prompt using a specific val

    Hi all,
    I'm using a dashboard prompt showing several fields ie Company, Business Area, Dept. They are set as the following:
    Drop Down List Box
    Show > All Choices, Constrained
    Default > Specific Value
    The requests work fine with these prompts. The problem is if I go to Dept drop down, all I see are '(All Choices)' and the default dept I established defining the prompt. There are other depts for the same Business Area that I want to see, not just the default value.
    What did I do wrong?
    Thanks in advance

    Hi ,
    may be the problem with company also ,you enabled the constrained to company as well i guess..
    Just check with this order Business Area,Dept , Company , .. enable the constraint for company and Dept and test the prompt by selecting the business area , are you able to see the company and dept correctly or not.
    Just a testing method ...helpful for you.
    Thanks,
    Ananth

  • Issue in Default selection in Dashboard prompt

    Dear All,
    I have a dashboard prompt with columns year and month.month column i kept as slider in that default selection i kept 45 days backward from current date,since my requirement is the end user have the option to selection the day backward instead of 45 they need to selection either 45 or 30 15 15 based on that they have to run the report.can any help in this regards.
    appreaciate the immediate response !!!!
    Regards
    GN

    Hi GN,
    Create an variable prompt ( Eg: v_days ) and add custom values as 15,30,45,100 into it and keep the default as 45.
    Use v_days variable in another column prompt (Eg: Period) with the format MON-YYYY.
    Now when user selects no of days , period will get the corresponding change.
    Thanks,
    Haree

  • How to retain the presentation variable values for Dashboard Prompt

    I've a dashboard prompt with date and two other drop down field, with default value as yesterday's date set for date and All Values set for other two drop down list. Presentation Variables are D1, P1 and P2 respectivilly
    I'm using GO URL from "Report A" and passing presentation variable to navigate to other report (Report B) that works fine. eg:
    '<a href = saw.dll?GO&path=/shared/Reports/ABC/ReportB&Action=Navigate&p0=1&p1=eq&p2="-%20Time"."Next%20Day"&p3=@{d1}>Test</a>'
    From Report B I'm using Dashoard URL to go back to Previous Report like:
    <div class="XUIPromptEntry minibuttonOn">
    Return to Previous Screen</div>
    This also works fine.
    My problem is that, when users selects different values in the Main dashboard prompt for date and other other two drop down and navigates to other report (Report B), and from Report B, when user returns to previous screen (Main Dashboard), Prompts values gets refreshed to original default values.
    Is there any way to retain the values of presentation variable in dashboard Prompt when I return to main dashboard from Report B?
    I'd appreciate your help.
    Thanks

    Change your dashboard url include the column and column value for the date column sample shown below,
    [a href=saw.dll?Dashboard&PortalPath=/shared/sample/_portal&page=pagename&Action=Navigate&col1=Dim.Date&val1=@1>Return to Previous Screen[/a>
    In my second report Date is the first column so I referenced it's value as @1 in the dashboard URL
    note: replace [ with <
    Thanks,
    Vino                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to setup a default value when defining (prompting) for a value?

    When I prompt the user in a SQL statement then I can declare a default value like in:
    SELECT *
    FROM all_users
    WHERE username = nvl('&myvariable','SYSTEM');
    But when I define a variable this does not work:
    define tablename=nvl('&tablename','test123')
    How can I setup a default value here?
    Peter

    Is there a way to define a default value DIRECTLY in SQLplus DEFINE command (and not later when the value is used in SQL statement)?no, there is not for DEFINE but you can use ACCEPT:
    SQL> accept tablename prompt 'Enter value for table Name:' default EMP
    Enter value for table Name:
    SQL> select column_name
      2  from cols
      3  where table_name='&tablename';
    OrderNumber=1234
    COLUMN_NAME
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO
    8 rows selected.Max
    [My Italian Oracle blog| http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]

Maybe you are looking for

  • Double sided card in Indesign

    Hi, I have a problem with creating some double sided cards in Indesign and I was hoping that someone can help me please? I have to create double sided cards in Indesign, so each side of the card has a border and crop marks in the exact same place. Ea

  • Can I use the RAM from my Edge E420s in my X120e?

    Hi there. Is it possible to transfer the 4GB of RAM from my water damaged E420s to my new X120e which are arriving monday? Thanks in advance! Solved! Go to Solution.

  • Reverse printing (unintended mirroring) on Brother MFCs

    In reply to several posts now archived, mirroring which occurs even when mirror printing is not selected, is cured on my MFC 420CN by: advanced options --> print settings, uncheck "bi-directional printing."

  • Lumia 1520's camera

    Hi. I just bought the Lumia 1520. I'm from the Philippines. After turning it on I went to the main camera to check out the 20mp camera.i was a bit disappointed because the camera was noisy and yes I used both the native app and the Nokia pro camera.

  • Screen collapses to single white line

    I have my iMac hooked up to a Trinitron Monitor via a VGA cable. Recently the display collapsed to a single white verticle line in the middle of a black screen, as if the screen image had been compressed into a half centimetre/third of an inch in the