Lesson 7: Variables and Dashboard Prompts: ORA291 Introduction To Oracle BIEE Answers
Lesson 7: Variables and Dashboard Prompts: ORA291 Introduction To Oracle BIEE Answers
Lesson 7: Variables and Dashboard Prompts: ORA291 Introduction To Oracle BIEE Answers
This class has been designed to provide the knowledge and tools necessary to use
OBIEE ad hoc Answers to its fullest potential. This particular lesson on Dashboard Prompts
is not intended as a preparation to start developing dashboards, but rather an overview of
basic OBIEE Dashboard functionality and its design potential.
Each functional business area will typically authorize one or two people to develop ‘official’
reports and dashboards for distribution to a set of end users. Functional offices have control
over “publishing” in OBIEE, with a functional QA Administrator who will oversee
development and govern migration of new or revised reports and dashboards from
OBIEEDEV to OBIEETEST, and then on to OBIEEPROD.
Variables: Definition
A variable is nothing more than a single piece of information stored for later use. It may be a
character string, a number, or a date. It must be a simple, one-cell object: one string, one number, or
one date.
When imagining variables, it is helpful to think of three shelves on the wall. Each shelf is a different
color (red, silver, or purple), and each shelf holds some number of paper cups of the same color as the
shelf. Each paper cup has a label on the outside, and a small slip of paper inside, on which is written a
character string, number or date.
The top shelf is red, and holds red cups. Each of those red cups has a label on it, and inside each red
paper cup is a slip of paper with a character string, a number, or a date on it. Those red paper cups
represent Repository variables. The label on the outside of the cup is the name of the Repository
variable, and the single piece of information on the slip of paper inside of the cup is the value of the
Repository variable.
Similarly, there is a silver shelf, on which sit silver paper cups with labels, each paper cup containing a
slip of paper with a single piece of information. The silver cups on the silver shelf represent Session
variables.
Finally, there is a purple shelf with purple cups, each with a slip of paper with a single piece of
information, each representing a Presentation variable.
Repository Variables
Repository variables (the red cups) are created and populated by the OBIEE Administrator as part of
the metadata repository. Values of repository variables are reset on a regularly scheduled basis, and
cannot be changed by any user. The value of any given repository variable (i.e. the string, number, or
date on the piece of paper in the labeled red paper cup) is the same for all users. The date of the most
recent data load would be an example of a repository variable.
Session variables (the silver cups) are also created by the OBIEE Administrator as part of the metadata
repository. The values of session variables are established when a user logs in to OBIEE, and the
same session variable may have a different value for each user.
System session variables: User ID, the user’s data security groups, and the user’s web catalog
group(s) are all examples of system session variables. These variables are not eligible to be changed
by any user.
Non-system session variables: These are variables which are defined by the OBIEE administrator for
whatever purpose may be required. The administrator may allow users to change the values of any or
all session variables. The user’s office location might be an example of a session variable that may not
be changed by the user. System variables defined for population by dashboard prompts and
subsequently used as filter criteria would be examples of session variables that may be changed by the
user. After their initialization during the user’s session login, populating such system variables can
only be accomplished with a dashboard prompt.
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.
There is no way to just “create and populate a variable” for use in OBIEE. It must be defined in the
repository or on a dashboard prompt.
In an earlier lesson, we learned how to create Column Filter Prompts, which can be used to provide
users with a filtering and selection mechanism in the absence of a dashboard. If an analysis isn’t
intended for deployment to a dashboard, the Column Filter Prompt method of filtering an analysis is
the proper mechanism to use. Dashboard prompts are used when deployment of an analysis on a
dashboard is desired.
Dashboard Prompts are used in conjunction with Answers analyses in which one or more Answers
Filters are set to “is prompted”, or which feature a filter condition based on the values of one or more
Presentation variables. For example, an Answers analysis might require the user to select a Fiscal
Month from a list of all values, whereupon the Answers analysis would display data for that Fiscal
Month. That list of all values can be included in an object known as a Dashboard Prompt, which
requires the Answers analysis to have an “is prompted” filter on the Fiscal Month column.
The prompt we are about to create can be included on one or more Dashboards, and can be used to
control the scope of analyses on an individual dashboard page, or an entire dashboard.
2. As was the case when creating an analysis, a dashboard prompt is sourced from a single
Subject Area. Select the Training Subject Area as the source for this dashboard prompt.
When you get additional Answers access to other Subject Areas, those will appear in this drop
down list, just as they will in the Answers Subject Area list on the default Answers page.
This particular prompt will be a Variable Prompt. Variable Prompts permit us to present the user
with data entry boxes, as opposed to Column Prompts which display a list of values from a particular
column (such as Fiscal Month) for the users to choose from.
5. Create the Prompt as shown in the screenshot below, then click OK. The key features of this
Dashboard Prompt are:
7. Starting with the green again, add another Variable Prompt, with these characteristics:
9. Use the Save icon to save this re-usable prompt in My Folders, in a NEW subfolder called
Prompts.
This is a Cornell Best Practice for organizing all of the objects in My Folders
a. In the Save As dialog box, use the New Folder icon at the top to create Prompts.
b. Double-click the new Prompts folder in the list.
c. Save your new Dashboard Prompt in that subfolder as Range Prompt.
11. Also notice the toolbar at the top right of the Definition section at the top of the screen. Notice
that the icon for the Column-based Layout is currently highlighted. This is causing the
prompts to be arranged in one vertical column.
12. Let’s switch to a Row-based Layout, in which the prompts are laid out side-by-side. Click the
Row-based Layout icon. Now the prompts should be side-by-side on one row.
This example dashboard prompt contains five Column Prompts and two Variable Prompts.
In this example, the Column-based Layout icon is selected. By default, all 7 of these prompts will be
arranged vertically, in one column. But notice that under the New Column heading there are two
checkboxes ticked, one for Work Type, another for Lower Limit. Notice that in the Display section,
the Work Type prompt starts a new column, as does the Lower Limit prompt.
By default, all prompts would be arranged on a single row. Notice that a new row is started with the
Work Type prompt and with the Lower Limit prompt, because of the ticked checkboxes.
Limit values by
This option allows us to display only relevant values of some prompts based on other prompts. For
example, we might want to select values of Work Type, then only see values in the Application
prompt that are related to those Work Types. If so, we would tick the Limit values by checkbox for
the Application prompt, and specify that its values should be limited by the user’s selections from the
Work Type column prompt.
Set a Variable: The two possible values are Presentation Variable and Request Variable
• Presentation Variable: A variable that is created by the dashboard prompt
• Request Variable: The name of a Session Variable.
Turn to the next page to continue with the dashboard prompt/analysis exercise.
14. Begin a filter for the Corrected Hours column, using the Is Between operator
15. As you learned in an earlier lesson in which you used Repository Variables, entry boxes on the
filter dialog that are labeled Value will use the literal character strings entered there. Since we
want to use our two Presentation Variables as the lower and upper bounds of our filter, click in
the first Value box and click the Add More Options button.
23. Click on the Dashboards link in the toolbar, and select My Dashboard.
Note: My Dashboard is your own personal dashboard space, to be used for whatever purpose
you desire. Nobody else can see or alter your My Dashboard. You cannot explicitly share
access to your My Dashboard. It is exclusively assigned to you, in your personal workspace.
The list of shared dashboards that you see below the My Dashboard link may vary, depending
on the access rights granted to you by the administrators of the system based on your needs.
24. At the top right of the page, underneath your sign-in name, click the Page Options button, then
Edit Dashboard.
25. From the toolbar above the empty design canvas, click the Add Dashboard Page icon, and
enter Range as the page name. Click OK.
28. Grab and drag the Range Prompt object to the right, dropping anywhere on the empty design
canvas.
29. Further down in the My Folders list, grab and drag the Ranged Results object, dropping it
directly below the Range Prompt placeholder. Make sure to drop Ranged Results inside
Section 1 by placing the mouse directly onto the bottom border line of Section 1, and release
the mouse button when you see the border around Section 1 turn yellow.
32. Test the interaction between the analysis and the dashboard prompt by entering values into the
Low Limit and High Limit fields, and clicking the Apply button.
1. Create this new Answers analysis with the Fiscal Month, Division, Work Type, and Corrected
Hours columns, sorting by Corrected Hours in descending order as shown.
2. Add any column to the analysis, such as Corrected Hours again, then change its formula and
Customize its Column Heading as shown below. Refer to page Error! Bookmark not
defined. for a refresher on modifying and creating column formulas.
The RSUM (running sum) function is found under Running Aggregates, and the SUM function is
found under Aggregates (or you may just type them if you wish). The formula for Running Pctg is:
Running Pctg is a running total of the percentage of total Corrected Hours encountered row-by-row in
the Answers analysis.
3. Modify the Running Pctg column properties to display with 1 decimal and a percent sign.
Top_X_Pct is the name of a Presentation Variable that we’ll create shortly. Set a default, such
as 60, which will mean to display the top 60% of the results. Note that this setting only applies
for testing in Answers. We will also specify a default value on the dashboard prompt.
Helpful Hint: Notice that since Running Pctg is a custom formula, the formula for
the column, and not column name, is what will be saved as the filter condition.
Should the formula for the Running Pctg column change in the future, this filter
will not reflect that change.
5. Apply the previously saved Current Fiscal Month filter to the analysis. The filters should
look like this:
Note that we’re specifying a default of 50 as the value of the Top_X_Pct presentation variable.
The default specified in the analysis filter was 60? Which of the two values do you expect will
be used as the default on the dashboard?
9. Click on the Dashboards link, choose My Dashboard, choose Page Options … Edit
Dashboard, and add a new page called Top X%.
10. Drag Top X% Prompt and Top X% Cumulative from the selection panel, and drop them
onto the new dashboard page, as shown here:
11. Save and run the dashboard. Notice that the dashboard prompt default of 50 is initially shown.
12. Enter a value such as 65 into the Top X% field, and click Apply. Your report should only
show those combinations of Division and Work Type which make up less than the top 65% of
the total of all Corrected Hours for the current Fiscal Month.
The TopN and BottomN functions are actually filters, not functions. When you include a TopN or
BottomN function in a column formula, the analysis is automatically filtered to only return the number
of rows specified in that function.
1. Create this Answers analysis with the Application column once, and the Corrected Hours
column twice.
2. Modify the formula for the 2nd Corrected Hours column so that its column heading is Rank,
and its formula is TOPN(“Effort”.”Corrected Hours”,@{NCount}{15}) as shown below.
The TOPN function is found under Aggregates. The @{NCount}{15} shows the use of a
Presentation Variable called NCount (with a default value of 15) that will be created in a
dashboard prompt. You may type it in as shown, or you may use the Variable button to insert
it in the formula. Reminder: Presentation Variable names are case sensitive.
4. Apply the Current Fiscal Month filter to the analysis. The criteria should look like this:
8. Edit My Dashboard, add a new page called Top N, and add the Top N Prompt and Top N
analysis to the page.
Note: In any given analysis, there can only be one TopN or BottomN function. That’s one
total, not one of each.
1. Create this simple unfiltered analysis in Answers, and save it as Required Prompt Analysis.
2. Remembering the techniques for grouping filters as learned in a previous lesson (refer to page
Error! Bookmark not defined.), create filters for the three dimension columns as shown
below.
Note: the first filter in each pair uses the is equal to / is in operator, and the value to compare
is the four characters n-u-l-l. This is not an IS NULL operator. The comparison string can be
any value that you know does NOT exist in the column, and null is usually a pretty good one.
This will force the filter to return no results.
We read the first filter group like this: “I want to see Fiscal Month values that match the character
string ‘n-u-l-l’, plus all values that match what the user has selected from a dashboard prompt.” If the
user hasn’t selected anything in the prompt, and since we know that there isn’t a value of Fiscal Month
spelled n-u-l-l, then that first filter won’t return any hits, and the analysis will return zero rows.
And of course, the other two prompt sets work exactly the same way. So, until the user has made a
selection from all three prompts, the analysis will not return any rows.
One caveat for YOU as you’re developing in Answers: You’ll want to click that first AND to
temporarily change it to an OR as you’re working with it, (or apply some other filter), otherwise you
won’t see any results in Answers.
7. Edit My Dashboard, create a new page named Required, and mate the new dashboard prompt
with the new analysis.
8. Notice that the analysis initially returns no information (which is what we intended), and that
the default No Results message is being displayed. If you wish to do so, you may return to
Answers, and add a totally blank No Results message to the analysis, using the techniques
learned in an earlier lesson.
9. Make selections from each of the three prompts and click Apply to display the results.
The column values and column headings in an Answers analysis may, at the option of whomever is
creating and/or editing the Answers analysis, be defined as drill links or navigation links.
Definitions:
Drill Link – A drill link displays the next lowest hierarchical level of information. When a user clicks
on a column value and/or a column heading, Answers will "drill" down to the next lower level in the
hierarchy associated with the source column. Values at the lowest level of the dimension hierarchy
cannot be displayed as drill links.
Navigation Link – A navigation link redirects the user to a specified dashboard page or to a specified
Answers analysis. When a user clicks on a column value and/or a column heading, Answers will open
a specified target Answers analysis or navigate to a specified dashboard page.
1. Create this simple analysis in Answers, and save it as Drill and Navigate.
4. Click on the Division column heading link. Notice that the three existing Divisions are
retained, and their associated “child” Departments are now displayed in a column immediately
to right of the Division column. The data values represent data at the Department level.
6. Next, click on the Operational Improvement link next to the Graduate School Division.
Notice that the resulting analysis is now filtered to include only those column values associated
with the clicked value, including the specific values in columns to the left of the clicked
value.
So we see that clicking to drill on a column heading will retain all values in all columns, and just add
a new “child” column to the analysis (i.e. will not add filters), while clicking to drill on a value within
a column will add a new “child”column and create filters for all columns to the left of the clicked cell.
8. Return to the Criteria tab, and open the Column Properties for the Division column.
9. On the Interaction tab, click the Value Interaction dropdown, and select Action Links.
(We’ll leave the Column Heading Interaction at its Default setting, which is Drill.)
12. Browse to the location shown in the screenshot below, and click OK.
Notes:
c. If an Answers Analysis is specified as the destination (as shown here) that Analysis
will be opened when the link is clicked. Note that even though we located an analysis
by browsing into a dashboard, our means of locating it is irrelevant: we selected an
analysis, and only that Analysis will be opened, not the dashboard that contains it.
13. If you were to choose to add more than one Navigation Target, you would also want to add a
value into the Caption box to allow the user to select from multiple destinations.
17. Notice that the Division column is only displaying the value that we clicked on the source
analysis. Reason: this analysis has an is prompted filter for the Division column. A
navigation link can also serve as a filtering device when the target contains an is prompted
filter for the column in question.
18. Notice also that the Fiscal Month column is displaying all values. But wait a minute: when we
were testing the default drilling behavior, didn’t all columns to the left of the clicked value
become filtered on just those values? Why is this column behaving differently?
Remember way back in the Filters lesson where we protected the filter containing our YTD
Fiscal Months? Now you can see the effect of protecting a filter. If we had not selected the
protected option for the filter, it would have been ignored in favor of the implied filter
resulting from the drilling or navigation action. Without that protection, we would only see
one Fiscal Month, whichever one was associated with the row on which we clicked the value
of Division.