@{variablename}{defaultvalue}
where variablename is the name of the presentation variable and defaultvalue (optional) is a constant or variable reference indicating a value to be used if the variable referenced by variablename is not populated.
■To type-cast (that is, convert) the variable to a string, enclose the entire syntax in single quotes, for example:
'@{user.displayName}'
Note: If the @ sign is not followed by a {, then it is treated as an @ sign.
When using a presentation variable that can have multiple values, the syntax differs depending on the column type.
Use the following syntax in SQL for the specified column type in order to generate valid SQL statements:
■Text — (@{variablename}['@']{'defaultvalue'})
■Numeric — (@{variablename}{defaultvalue})
■Date-time — (@{variablename}{timestamp 'defaultvalue'})
■Date (only the date) — (@{variablename}{date 'defaultvalue'})
■Time (only the time) — (@{variablename}{time 'defaultvalue'})
In OBIEE, there are two types of variables that are commonly used −
Apart from this you can also define Presentation and Request variables.
A Repository variable has a single value at any point of time. Repository variables are defined using Oracle BI Administration tool. Repository variables can be used in place of constants in Expression Builder Wizard.
There are two types of Repository variables −
Static repository variables are defined in variable dialog box and their value exists until they are changed by the administrator.
Static repository variables contain default initializers that are numeric or character values. In addition, you can use Expression Builder to insert a constant as the default initializer, such as date, time, etc. You cannot use any other value or expression as the default initializer for a static repository variable.
In older BI versions, the Administrator tool did not limit value of static repository variables. You may get warning in consistency check if your repository has been upgraded from older versions. In such case, update the static repository variables so that default initializers have a constant value.
Dynamic repository variables are same as static variables but the values are refreshed by data returned from queries. When defining a dynamic repository variable, you create an initialization block or use a preexisting one that contains a SQL query. You can also set up a schedule that the Oracle BI Server will follow to execute the query and refresh the value of the variable periodically.
When the value of a dynamic repository variable changes, all cache entries associated with a business model are deleted automatically.
Each query can refresh several variables: one variable for each column in the query. You schedule these queries to be executed by the Oracle BI server.
Dynamic repository variables are useful for defining the content of logical table sources. For example, suppose you have two sources for information about orders. One source contains current orders and the other contains historical data.
In the Administration Tool → Go to Manage → Select Variables → Variable Manager → Go to Action → New → Repository > Variable.
In the Variable dialog, type a name for the variable (Names for all variables should be unique) → Select the type of variable - Static or Dynamic.
If you select dynamic variable, use the initialization block list to select an existing initialization block that will be used to refresh the value on a continuing basis.
To create a new initialization block → Click New. To add a default initializer value, type the value in the default initializer box, or click the Expression Builder button to use Expression Builder.
For static repository variables, the value you specify in the default initializer window persists. It will not change unless you change it. If you initialize a variable using a character string, enclose the string in single quotes. Static repository variables must have default initializers that are constant values → Click OK to close the dialog box.
Session variables are similar to dynamic repository variables and they obtain their values from initialization blocks. When a user begins a session, the Oracle BI server creates new instances of session variables and initializes them.
There are as many instances of a session variable as there are active sessions on the Oracle BI server. Each instance of a session variable could be initialized to a different value.
There are two types of Session variables −
System session variables are used by Oracle BI and Presentation server for specific purposes. They have predefined reserved names which can’t be used by other variables.
| This variable holds the value the user enters with login name. This variable is typically populated from the LDAP profile of the user. |
| This variable contains the Global Unique Identifier (GUID) of the user and it is populated from the LDAP profile of the user. |
| It contains the groups to which the user belongs. When a user belongs to multiple groups, include the group names in the same column, separated by semicolons (Example - GroupA;GroupB;GroupC). If a semicolon must be included as part of a group name, precede the semicolon with a backslash character (\). |
| This variable contains the application roles to which the user belongs. When a user belongs to multiple roles, include the role names in the same column, separated by semicolons (Example - RoleA;RoleB;RoleC). If a semicolon must be included as part of a role name, precede the semicolon with a backslash character (\). |
| It contains the GUIDs for the application roles to which the user belongs. GUIDs for application roles are the same as the application role names. |
| It contains the permissions held by the user. Example - oracle.bi.server.manageRepositories. |
Non-system session variables are used for setting the user filters. Example, you could define a non-system variable called Sale_Region that would be initialized to the name of the sale_region of the user.
In the Administration Tool → Go to Manage → Select Variables.
In the Variable Manager dialog, click Action → New → Session → Variable.
In the Session Variable dialog, enter variable name (Names for all variables should be unique and names of system session variables are reserved and cannot be used for other types of variables).
For session variables, you can select the following options −
Enable any user to set the value − This option is used to set session variables after the initialization block has populated the value. Example - this option lets non-administrators set this variable for sampling.
Security sensitive − This is used to identify the variable as sensitive to security when using a row-level database security strategy, such as a Virtual Private Database (VPD).
You can use the initialization block list option to choose an initialization block that will be used to refresh the value regularly. You can also create a new initialization block.
To add a default initializer value, enter the value in the default initializer box or click the Expression Builder button to use Expression Builder. Click OK to close the dialog box.
The administrator can create non-system session variables using Oracle BI Administration tool.
Presentation variables are created with creation of Dashboard prompts. There are two types of dashboard prompts that can be used −
Presentation variable created with column prompt is associated with a column, and the values that it can take comes from the column values.
To create a presentation variable go to New Prompt dialog or Edit Prompt dialog → Select Presentation Variable in the Set of a variable field → Enter the name for the variable.
Presentation variable created as variable prompt is not associated with any column and you need to define its values.
To create a presentation variable as part of a variable prompt, in the New Prompt dialog or Edit Prompt dialog → Select Presentation Variable in the Prompt for field → Enter the name for the variable.
The value of a presentation variable is populated by the column or variable prompt with which it is created. Each time a user selects a value in the column or variable prompt, the value of the presentation variable is set to the value that the user selects.
Initialization blocks are used to initialize OBIEE variables: Dynamic Repository variables, system session variables and non-system session variables.
It contains SQL statement that are executed to initialize or refresh the variables associated with that block. The SQL statement that are executed points to physical tables that can be accessed using the connection pool. Connection pool is defined in the initialization block dialog.
If you want the query for an initialization block to have database-specific SQL, you can select a database type for that query.
Default initiation string field of initialization block is used to set value of dynamic repository variables. You also define a schedule which is followed by Oracle BI server to execute the query and refresh the value of variable. If you set the logging level to 2 or higher, log information for all SQL queries executed to retrieve the value of variable is saved in nqquery.log file.
Location of this file on BI Server −
ORACLE_INSTANCE\diagnostics\logs\OracleBIServerComponent\coreapplication_obisn
Session variables also take their values from initialization block but their value never changes with time intervals. When a user begins a new session, Oracle BI server creates a new instance of session variables.
All SQL queries executed to retrieve session variable information by BI server if the logging level is set to 2 or higher in the Identity Manager User object or the LOGLEVEL system session variable is set to 2 or higher in the Variable Manager is saved in nqquery.log file.
Go to Manager → Variables → Variable Manager Dialog box appears. Go to Action menu → Click New → Repository → Initialization Block → Enter the name of initialization block.
Go to Schedule tab → Select start date and time and refresh interval.
You can choose the following options for Initialization Blocks −
Disable − If you select this option, initialization block is disabled. To enable an initialization block, right-click an existing initialization block in the Variable Manager and choose Enable. This option enables you to change this property without opening the initialization block dialog.
Allow deferred execution − This allows you to defer the execution of the initialization block until an associated session variable is accessed for the first time during the session.
Required for authentication − If you select this, initialization block must execute for users to log in. Users are denied access to Oracle BI if the initialization block doesn’t execute.
Find centralized, trusted content and collaborate around the technologies you use most.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Get early access and see previews of new features.
I have a dashboard prompt setting a presentation variable, based on months.
I am then trying to use the presentation variable in column formulae, however I am getting the following error when I try to preview it by selecting the month of February:
COlumn Formula :
However when I use the same variable in the analysis filter (not in the column formula, but whole analysis) it seems to run fine. But I need the presentation variable applied on particular columns and not on all of them.
Could anyone please advise how to achieve this or what I am doing wrong when using the presentation variable in the column formula.v
--Create a prompt with sql query which will fetch all month name or month number --Assign a presentation variable to that prompt --use that variable as a filter condition in analysis for that particular column.
So how it works is--when u select any month name from prompt that will be assigned to variable.And same month name in that variable will be used as filter condition for your column and and it will fetch data accordingly and report will run properly. PFB a blog related to presentation Variable.
" https://blogs.oracle.com/ExalyticsOBIEE/entry/how_to_pass_presentation_variable
I assume you have setup a presentation variable already called MonthName, yo will need to add the formulae like this (@{MonthName}['@']{'January'}) . in between mothname and default January.
Hope that helps.
Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more
Post as a guest.
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .
For appeals, questions and feedback about Oracle Forums, please email [email protected] . Technical questions should be asked in the appropriate category. Thank you!
Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.
Oracle has updated its online Terms of Use and Community Guidelines and introduced a Community Integrity Policy . These changes document Community specific rules and Oracle’s content moderation practices including use of automated tools, appeals process, and Oracle’s contact details. If you object to any changes, you may request that your account be closed by contacting [email protected] . Your continued use of Oracle Communities means that you are consenting to the updated terms.
I am trying to use presentation variable in evaluate function.getting below error.
Cannot function ship the following expression evaluate
If I use date column it is working fine.
Please suggest
IMAGES
COMMENTS
The syntax for referencing presentation variables is as follows: @{variables.<variableName>}{<default>}[format] variables - (optional) variableName - a reference to an object available in the current evaluation context that is not a reserved variable name. default - (optional) - a constant or variable reference in Obiee logical sql indicating a ...
1. I have a question concerning the use of presentation variables: 1) What's the correct syntax for filtering on a presentation variable is used? You allow a user to select multiple values in a filter eg. A and B. If you use the syntax = '@ {PV} {%}' it will result in this sql: = 'A, B' which of course won't exist in the data.
Since i'm using OBIEE 12c, I can save both the Products and Locations columns to the web catalog and simply create a column selector just like I would do for any of the columns within a subject area. ... The syntax for putting a presentation variable in a column formula, column heading or text object is as follows: @{presentation_variable_name ...
Any value selected by the prompt will then be sent to any references of that filter throughout the dashboard page. In the prompt: From the "Set a variable" dropdown, select "Presentation Variable". In the textbox below the dropdown, name your variable (named "n" above). When calling this variable in your report, use the syntax @ {n ...
New Features for Oracle BI EE 12c \(12.2.1\)xxi. ... What Is the Syntax for Referencing Variables? 2-36 What Predefined Presentation Variables Are Available? 2-41 Example of Referencing a Variable in a Title View 2-43. 3 . Adding External Data to Analyses.
The guidelines for referencing session variables in expressions are: Include the session variable as an argument of the VALUEOF function. Enclose the variable name in double quotes. Precede the session variable by NQ_SESSION and a period. Enclose both the NQ_SESSION portion and the session variable name in parentheses.
This function changes the data type of an expression or a null literal to another data type. Most commonly used datatype values for 'y' are: CHAR, VARCHAR, INTEGER, DOUBLE PRECISION, DATE, TIME, TIMESTAMP. NOTE: If you use the CHAR datatype, you can add a size parameter.
Presentation Variables Presentation Variables are created by, and exist only in the context of, a Dashboard Prompt. The values of Presentation variables may be used as filtering conditions for any analyses on the dashboard(s) on which the dashboard prompt is present. The use of a dashboard prompt is the only way to create a presentation variable.
We have a multi select prompt which is initialising a presentation variable (which is a string). ... To achieve it use below syntax for Presentation Variable : FILTER("HR Facts"."Headcounts" USING "Location"."Region Name" IN (@{pv_region}['@']{'West '})) ... OBIEE 12c Environment Variables, Config Files and Log File Locations Info Below are the ...
In this Document. Goal. Solution. My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts. Business Intelligence Suite Enterprise Edition - Version 11.1.1.7.0 and later: OBIEE 11g | 12c: What Is the Syntax for Referencing Presentation Variables with Multip.
To use the Presentation variables in Title,Subtitle,Narratives,fx of any reports the syntax is - @ {variable_name}. Presentation Variable in Title view : Presentation Variable in Narrative view : But we should consider two things while using the variable in fx of request. The Presentation Server replaces the variable name with the value ...
Dear Gurus,I am trying to use Presentation Variables in Evaluate Function in OBIEE.OBIEE Version: 12.2.1.4, DB is Oracle 12c.Evaluate Function used:Evaluate('case when %1 = %2 then %3 end',
The date function and its date format. In OBIEE, an equivalent of the function TO_DATE is the DATE function which has this syntax. DATE 'YYYY-MM-DD'. The date format is unique where : YYYY is the Year with 4 numbers. MM is the Month of year 01, 02…12. DD is the Day of the month in numbers (i.e. 28)
Legend: The selection panel (area #1) contains the list of all tables and columns that can be selected in an Answers analysis for the selected subject area. As columns are selected, they will appear in the Criteria canvas in area #2. Filter conditions will be shown in the Criteria canvas in area #3.
Using Variables in OBIEE. You can reference variables in several areas of Oracle BI Enterprise Edition, including in analyses, dashboards, KPIs, actions, agents, and conditions. For example, suppose that you wanted to create an analysis whose title displays the current user's name. You can do this by referencing a variable.
OBIEE 12c: Setting a Presentation Variable using the GO URL. Hi, I'm using a GO URL to call a dashboard which has a few variable prompts (Dashboard Prompts Type=variable). The variable prompts are set via SQL Results in the Default section of the prompts. I've created a Prompted Link to see how its done in a static link and I can see from the ...
Can you also show your exact syntax, I note that you say date column, do you cast your presentation column also to a date column when passing it in to the call to evaluate? 0 · Share on Facebook Share on Twitter
In the Variable Manager dialog, click Action → New → Session → Variable. In the Session Variable dialog, enter variable name (Names for all variables should be unique and names of system session variables are reserved and cannot be used for other types of variables). For session variables, you can select the following options −.
Answers. A title view will render the RESULT of a formula but will never interpret the formula itself. You need a the result of the formula in a column or a variable and reference that. The title view will show "4" if you have "4" as the result of a column formula or in a variable. The title view will not show "4" if you type "2+2" into the ...
0. --Create a prompt with sql query which will fetch all month name or month number --Assign a presentation variable to that prompt --use that variable as a filter condition in analysis for that particular column. So how it works is--when u select any month name from prompt that will be assigned to variable.And same month name in that variable ...
For appeals, questions and feedback about Oracle Forums, please email [email protected] questions should be asked in the appropriate category. Thank you!