Académique Documents
Professionnel Documents
Culture Documents
August 3, 2016
CONTENTS
Overview ................................................................................................................................................ 4
The following is intended to outline our general product direction. It is intended for information
purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any
material, code, or functionality, and should not be relied upon in making purchasing decisions. The
development, release, and timing of any features or functionality described for Oracles products
remains at the sole discretion of Oracle.
This document supplements standard product documentation, which you are encouraged to review. To
find documentation and other learning resources, such as guides, whitepapers, and videos, visit the
Help Center for Oracle Sales Cloud.
AUDIENCE
This document is for Oracle Sales Cloud customers involved in implementation. The tips and techniques
detailed in this document may not be suitable for an on-premise deployment of Oracle Sales Cloud
Applications. This document assumes that you know how to develop reports for Oracle Sales Cloud.
Oracle Sales Cloud Business Intelligence (BI) variables hold predefined values and can be referenced in multiple
areas during the runtime of reports and dashboards. For example, variables can be used to pre-filter or
dynamically filter the reports during runtime. Variables can be referenced in:
Report Views
Title View
Narrative View
Static Text
Chart Scale Markers
Gauge range settings
Column Filters
Column Formulas
Conditional Formatting conditions (presentation variables only)
Direct Database Requests
Dashboard prompts
iBot Headlines and text
There are four different types of variables, based on how they are initialized:
1. Session Variables (pre-defined)
2. Repository Variables (pre-defined)
3. Presentation Variables (user definable)
4. Request Variables (user definable)
Later in this document, we give a few examples of how variables can be used. If you would like more details,
please refer to the Using Variables topic in the Oracle Fusion Middleware: User's Guide for Oracle Business
Intelligence Enterprise Edition.
SESSION VARIABLES
As the name suggests, session variables are created when a session begins, which is as soon as a user logs into the
BI server. Every login has its own session variable. There are two types of session variables, each of which can be
created only through the Oracle BI Administration Tool:
System which are defined by Oracle Business Intelligence Enterprise Edition (OBIEE) and are reserved
Non-System which are defined during the OBIEE Repository (RPD) development
This table contains the list of session variables available when a user logs in.
FCST_TERR_LIST
FCST_TERR_HIER_LEVEL_LIST
HIER_LEVEL Returns the current Fixed Hierarchy level of the user in the
Company hierarchy. The company hierarchy is based on the
Employee hierarchy tree.
HIER_LEVEL_MANAGER
RESOURCE_HIER_LEVEL
RESOURCE_HIER_LEVEL_LIST
RESOURCE_ORG_HIER_LEVEL_LIST
RESOURCE_ORG_LIST
REVERSED_LTS_PRIORITY_SA_VEC
TERR_HIER_LEVEL_LIST
TERR_HIER_LEVEL_LIST_ALL
TERR_LIST
REPOSITORY VARIABLES
A repository variable is a variable that has a single value at any point in time. There are two types of repository
variables, each of which can be created only through Oracle BI Administration Tool:
This table contains the list of Repository variables available when a user logs in.
PRESENTATION VARIABLES
A presentation variable can be created as a dashboard prompt. A dashboard prompt must be either a column
prompt or a variable prompt.
Column prompt: When a presentation variable is part of a column prompt, it is associated with a specific
column and initializes with that column's value.
Variable prompt: When a presentation variable is part of a variable prompt, the prompt values need to be
defined, as it is not associated with a column.
The name and value of the presentation variable are determined by the person that creates it. You need to use the
same name and value in your reference when you want to use the variable.
Format is useful to format the data. For example, for a date, the format can be MM/DD/YYYY.
Note: Default Value is not formatted. Scope should be used if variables are created with the same name
and scope can be analyses, dashboard pages and dashboard.
REQUEST VARIABLES
Request Variable is used to overwrite the value of a session variable, which happens only during request initiation
to the database from a column prompt. When creating a column prompt, a request variable can defined.
Request variables can be referenced in the same way as presentation variables and can be seen in the logical SQL
from the Advanced tab in BI Answers.
SELECT
0 s_0,
VALUEOF("CURRENT_MONTH") s_1,
VALUEOF("CURRENT_WEEK") s_2,
VALUEOF(NQ_SESSION.USER) s_3,
VALUEOF(NQ_SESSION.USER_PARTY_ID) s_4
ORDER BY 1, 4 ASC NULLS LAST, 5 ASC NULLS LAST, 3 ASC NULLS LAST, 2 ASC NULLS LAST
As stated earlier, the presentation variables can be set during runtime and can be used in filtering the reports or
overriding a request variable. This example gives a simple illustration of implementing a presentation variable in
Oracle Sales Cloud BI.
The scenario is that we want to filter period by Year, Month or Quarter. When a user selects a value from the
dashboard prompt, the data should be filtered, and the report should use those time values to present the data on
the dashboard. The steps to do this are:
1. Create a dashboard prompt with one prompt to select the time component (Year, Month or Quarter).
a. Select New > Dashboard Prompt. (Sales CRM - Pipeline subject area is used for this example.)
b. Select variable prompt and use the SQL given below to populate the values as shown in the screen
shot.
SELECT saw_0 FROM ((SELECT CASE WHEN 1=2 THEN "Sales - CRM Pipeline"."Time"."Enterprise Quarter"
ELSE 'Quarter' end saw_0 FROM "Sales - CRM Pipeline")
UNION
(SELECT CASE WHEN 1=2 THEN "Sales - CRM Pipeline"."Time"."Enterprise Year" ELSE 'Year' end saw_0
FROM "Sales - CRM Pipeline")
UNION
(SELECT CASE WHEN 1=2 THEN "Sales - CRM Pipeline"."Time"."Enterprise Period" ELSE 'Month' end saw_0
FROM "Sales - CRM Pipeline")) t1 ORDER BY saw_0
This variable value will be changed every time a user selects a value for this prompt and clicks Apply. This
value will be also used to populate the values for the next prompt.
3. Create a new analysis or use an existing analysis, and add a Period column by changing the column
formula. Please refer to the logical SQL below.
SELECT
0 s_0,
"Sales - CRM Pipeline"."Opportunity"."Opportunity Status Category" s_1,
case when '' ='Quarter' then "Sales - CRM Pipeline"."Time"."Enterprise Quarter" when '' ='Year' then
"Sales - CRM Pipeline"."Time"."Enterprise Year" end s_2,
"Sales - CRM Pipeline"."Pipeline Facts"."# of Opportunities" s_3,
"Sales - CRM Pipeline"."Pipeline Facts"."Opportunity Revenue" s_4
FROM "Sales - CRM Pipeline"
ORDER BY 1, 3 ASC NULLS LAST, 2 ASC NULLS LAST
FETCH FIRST 65001 ROWS ONLY
The column formula for period is as below. The tag '@{ftime}' is the reference to the variable set on the
dashboard. The screenshot below shows how to use the variable value as the column heading.
4. Save the analysis and add it to the same dashboard page where the dashboard prompt was added.