Repository variable syntax

What is the syntax for calling a rep variable in Answers?
Using the "@{<variable_name>}" format described in the Answers documentation, I am unable to display the values of Repository Variabes (like "CURRENT_QTR") on reports.

That looks like the right syntax:
The syntax for calling a Presentation variable, whether in a column or a Title view, is @{VariableName}. Your results should look like this, as the variable has not been defined or populated yet:
This tutorial might help you out as well:
http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/saw/saw.html
This section covers variables:
http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/saw/saw.html#t8

Similar Messages

  • Can we use repository variables in bi publisher like in anwers

    can we use repository variables in bi publisher like in anwers
    if possible then how

    Yes,
    but you should be using Oracle BIEE as Datasource in order to use the variable of repository
    you 'll have to follow this syntax: valueof("variable")

  • How to pass the repository variables in title view in obiee 11g

    all I am trying to create a reprot and the format of that report is
    TEST REPORT
    month range : 04/01/2012-04/30/2012.
    how can we get that date range in the title view.
    Any suggestions??

    Hi,
    For session variables:
    @{biServer.variables['NQ_SESSION.variablename' ]}
    For repository variables:
    @{biServer.variables['variablename']}
    Try this syntax in the title view it should work.

  • How to use the date repository variable in filter expression

    Hi Gurus
    I am getting error in using the date repository variable in Filter expression. I am using the below formula
    filter( Fact.calls USING  "Dim Time"."Fiscal Month End Date" = VALUEOF("month_start") )
    I am getting below error
    Formula syntax is invalid.
    [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22024] A comparison is being carried out between non-compatible types. (HY000)
    SQL Issued: SELECT filter( fact.Calls using "Dim Time"."Fiscal Month End Date" =VALUEOF("month_start")) FROM "Call Data"
    Then i tryed the below format i am getting still the error
    filter( Fact.calls USING  "Dim Time"."Fiscal Month End Date" = DATE'(VALUEOF("month_start"))' )
    Formula syntax is invalid.
    [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 46047] Datetime value (VALUEOF("month_start")) from (VALUEOF("month_start")) does not match the specified format. (HY000)
    SQL Issued: SELECT filter( Fact.Calls using "Dim Time"."Fiscal Month End Date" =DATE'(VALUEOF("month_start"))') FROM "Call Data"
    Please let me know what i am missing or what is the correct syntax for fitler using the date repository variable.
    Thanks in advance
    Regards
    @li

    Hi @li,
    Syntax-1 is fine it will work,What kind of Variable is it?
    Static or Dynamic
    Thanks,

  • How to set MULTIPLE repository variables using presentation variables

    Hi,
    I need to pass multiple values from presentation variable to repository.
    A brief about report design :
    I have two repository variables - from_dt and to_dt which are defaulted to some values from a database table and are editable by the user.
    I display these default date values on the dashboard. Plus there are two dashboard date prompts allowing user to enter a date range different from what is displayed by the from_dt and to_dt. The dates entered by user are assigned to presentation variables pv_from_dt and pv_to_dt.
    If user specifies a different date range then these date values are to be passed to a stored procedure which is called from the Connection Pool --> Connection Script Tab --> Execute before query. This procedure will do some calculations and populate a global temporary table before running the report.
    Problem :
    Now in the presentation server, in the Advanced tab, in the Prefix section, when i try to write something like this:
    SET VARIABLE from_dt = '@{pv_from_dt}';
    SET VARIABLE to_dt = '@{pv_to_dt}';
    I get the foll error :-
    Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SET>: Syntax error [nQSError: 26012] . (HY000)
    I tried all possible permutations and combinations
    SET VARIABLE from_dt = '@{pv_from_dt}',SET VARIABLE to_dt = '@{pv_to_dt}'; --- gave same error
    SET VARIABLE from_dt = '@{pv_from_dt}' SET VARIABLE to_dt = '@{pv_to_dt}'; -- gave same error
    How do we assign values to multiple reporsitory variables... ???
    Thanks
    Nusrat

    Hi,
    I wrongly referred to the variables as "repository" variables. Both variables are Session variables. For testing i added a column field in the report with source as the session variable - VALUEOF(NQ_SESSION.from_dt). In the Prefix section i assigned a literal value - SET VARIABLE from_dt='01-JAN-2012';
    When report is run, the literal value gets displayed.
    The idea to update a session variable, from dashboard using presentation variable, i got from the following URL.
    Go to http://oraclebizint.wordpress.com/category/obi-ee-plus/page/11/
    and see the section "Oracle BI EE 10.1.3.3/2 – Updating Session Variables from Dashboards using Presentation Variables"
    Thanks
    Nusrat
    Edited by: user10309945 on Jan 16, 2011 9:30 PM
    Edited by: user10309945 on Jan 16, 2011 9:59 PM

  • New Logical Column using repository variables

    Hello all,
    Can anyone let me know how we create a new logical column in OBIEE 11g in the BMM layer using the repository variables..Is there any way/chance to create such new logica columns.If so please let me know how we will be doing that

    This is alwayz possible.
    Here is the syntax.
    CASE WHEN VALUEOF(VAR1) ='ABC' THEN
    "Sample App Lite Data"."".""."F10 Revenue Facts (Order grain)"."Units"
    WHEN VALUEOF(VAR1) ='XYZ' THEN
    "Sample App Lite Data"..."F10 Revenue Facts (Order grain)"."Discnt_Value"
    END

  • How we cal the repository variable in static view

    Hi All
    i need to call the repository variable in static view.
    can any one help on this.
    thanks
    bethamsetty

    Hi,
    Did you try using this syntax in static text view?
    @{biServer.variables['VariableName']}
    Thanks

  • Regarding dynamic repository variable

    Hi Experts,
    I have made one dynamic repository variable. this variable calculates start date of week.
    i am using this variable in prompt as default value.
    the problem i am geeting its value is not getting refreshed. it shows static value that i have given in default initializer in
    rpd.i want its value gets changed in every week but it is not changing,its shows always default value that have
    given in rpd.
    Please share any solution to resolve this problem.

    Hi,
    Kindly use the below SQL syntax in the default selection of the dashboard prompt.
    SELECT CASE WHEN 1=0 THEN date_column else TIMESTAMPADD(SQL_TSI_DAY, -0, CURRENT_DATE) END FROM SH
    Regards
    MuRam
    NOTE: Please mention if this resolved your problem/still facing and close the thread.

  • Help using repository variable in dashboard text

    Hi,
    we have a dashboard section that shows current announcements regarding data issues, etc. This is just using a plain text object on the dashboard. I need to add the following to the top of the text: "Data loaded on xx/xx/xxxx".
    I've created a static repository variable called "DW_LOAD_DATE" and populated it with the proper date/time.
    I'm 100% able to use this in an answers query, but I'm stuck trying to figure out how to get it to show up in a dashboard plain text section with no Answers behind it. I've tried:
    {biserver.variables['DW_LOAD_DATE']}
    @{biserver.variables['DW_LOAD_DATE']}
    {biserver.variables[DW_LOAD_DATE]}
    @{biserver.variables[DW_LOAD_DATE]}
    In all cases, the only thing that shows up is the exact text from above - the substitution isn't being done properly. Can someone help, I'm obviously doing something dumb.
    Thanks!
    Scott

    Ok, I got the following to work (kind of):
    @{biServer.variables['DW_LOAD_DATE']}
    I was thrown off because the "preview" window shows it as the above string without doing the variable substitution.
    Now my last question - the above variable is stored as a TIMESTAMP, because in some cases we need to know the time in addition to the date. When it's showing in the dashboard text, I see the following:
    Data was last loaded on TIMESTAMP '2011-01-06 18:00:00'
    Is there a simple way to format this so it shows up like:
    Data was last loaded on 1/6/2011 18:00:00
    Thanks!
    Scott

  • How to initialize a Prompt drop-down list using a Repository Variable.

    Hi,
    the aim is to fill a drop-down list of a Year prompt only with year values that can provide data.
    This Show list SQL statement works:
    SELECT Time."Year" FROM "AnalysisCatalog"
    WHERE Time."Year" <= 2007
    Using the maxYear Repository Variable does not work:
    SELECT Time."Year" FROM "AnalysisCatalog"
    WHERE Time."Year" <= @{biServer.variables[’maxYear’]}
    Error Codes: G689FFB3:SDKE4UTF
    Expression: biServer.variables[’maxYear’]
    How can I achive the result without hardcoding the Year 2007?
    Mny thx Thomas

    Hi,
    Actually this error does not cause any harm except a presentation inconvenience. In my multi-select prompt I am using variable expression with dynamic repository variable. Dashboard results are correct. Just variable's value does not appear on page (error Error Codes: G689FFB3:SDKE4UTF
    Expression: @{biServer.variables['CUR_CAL_PER_MONTH_NAME']}). Pushing "GO" button on the prompt fixing the error but it's actually second execution of the dashboard.
    Any ideas ??

  • Issue with repository variable in OBIEE 11g

    Hi
    While i am using repository variable directly in filter it is working fine, but when i am using 'repository variable -1' in filter then it is throughing error as 'repository variable -1' is not present.
    Can't we use - , + on repository varaibles in filters.Can anyone help me.
    Thanks
    Edited by: Manu on Apr 2, 2013 4:28 AM

    I want to know how answers is treating it char type or number type?
    just cast it to number and try.
    Edited by: Srini VEERAVALLI on Apr 2, 2013 7:00 AM
    BTW: how you are calling variable
    lik this
    repository variable - 1
    or like this
    VALUEOF(repository variable) - 1
    Edited by: Srini VEERAVALLI on Apr 2, 2013 7:11 AM

  • How to pass the prompt value to repository variable in obiee 11.1.1.7

    Hi All,
    I am given a tabular report to build in OBIEE 11.1.1.7 version using insurance data.
    I have to show different types of claim names and their corresponding count in the table. One of the calculations require me to use the total no of claims(i.e sum of all the claims).
    Example:
    Total No of claims: 600
    Total No of Auto Claim: 60
    I have to create a table on Auto Claim like:
                   claim types       count
                        X                    10
                        Y                    20
                        Z                    30
    I was calculating total no of claims by using dynamic repository variable as it was a constant value. Example: repository_variable1: select count(claim ID) from Insurance; In report I was just using value of (repository_variable1)
    Now client has asked us to give date prompt so the total no of claims (assumed as 600) will change with respect to period. I can calculate total no of claims with respect to different claim type (as shown in the table above) with respect to period filter in the report.
    The problem I am facing now is, I need the count of all the claims on a partucular period too. Repository variable is giving always calculating the count as 600. But the count should change with respect to period selected. How to get this value?
    Can I create a presentation variable in the prompt and pass this value as an argument for repository variable?
    Please help. I am in urgent need of the solution.
    Thank you.

    Hi Srini,
    I tried creating it as metric. But the problem is my pivot table is on Auto Claims.
    Let me try to make myself a bit more clear.
    Total No of claims in fact table: 600
    Total No of Auto Claims in fact table: 60
                    claim types(auto claims)       count        Calculation
                        X                                        10             10/600
                        Y                                        20             20/600
                        Z                                        30             30/600
    So I need to access total no of claims to calculate. I cant use a metric as the count will take group by with respect to auto claim type and give value only for X claim.

  • Using a repository variable in a column in BP1

    I'm having a problem in 11.1.1.6.2 BP1 that I've not had before.
    I'm creating a column in my business model, and its formula is a repository variable called "Current Month". When I create it, the formula prepends the name of the initialization block which sets it. So instead of VALUEOF("Current Month"), I get VALUEOF("Set Times"."Current Month").
    When I move that into the presentation layer and attempt to use it in Answers, I get this error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 14020] None of the fact tables are compatible with the query request Repository variables.Current Month [ Current Month : 'Jul-2009' ] . (HY000)
    However, if I just manually create a column in Answers with the formula VALUEOF("Current Month"), it works just fine.
    So it appears that when the name of the initialization block is automatically prepended by the expression builder when defining a column in the repository, the column won't work. It feels like a bug. I've never experienced this with earlier versions of the software.
    Any workarounds?

    Dpka, the situation is actually a bit curious. I have two different repositories. Repository "A" started its life as a Sample Sales repository, and the variables work on that one. Repository "B" was created from scratch, and the variables fail on that one.
    I'm investigating the potential differences. I'll report back here.

  • Repository variable is not working for prompted date

    Hi experts..
    I have created one repository variable sum(amount1), but it is not filtering according to date local.... i need to filter it according to date local.

    Thanks for reply..
    I need to calculate the value in A1 = Amount in A in each row is how much % of SUM(A) ..and want to show in chart..

  • Repository Variables in Dashboard prompt.

    I am still learning how to use variables in Dashboard. I have created one Dynamic Repository Variable. I want to use this variable as Default in Dashboard prompt.
    Please help me resolve this issue.
    Thanks,
    Pooja

    Hello,
    This post get help you.
    http://bischool.wordpress.com/2009/06/17/set-yesterday-or-some-date-value-as-default-in-obiee-dashboard-prompt/
    Regards,
    Luko

Maybe you are looking for