Académique Documents
Professionnel Documents
Culture Documents
Building Cross-Subject Area Reports using Common and Local Dimensions ..........................................8
Configuration/Setup Required for Cross Subject Area reports to work ................................................8
How local dimensions may impact the rows returned in a report........................................................10
How results returned from the individual Cross Subject Area queries may not get merged
the way you would want. .....................................................................................................................11
Appendix A. ....................................................................................................................................................16
Appendix B. ....................................................................................................................................................18
Terms/Glossary. .............................................................................................................................................19
Introduction
Oracle Transactional BI (OTBI) is a real-time reporting solution for Fusion Applications. This document
contains recommendations for building OTBI reports. Specifically it focuses on how to create Cross
Subject Area reports and addresses some of the main issues report developers face while generating such
reports.
The document also includes logical SQLs for all examples used in the document. Understanding these
logical SQLs is not necessary to understand most of these guidelines and have been included for advanced
users.
This document is applicable for Fusion Applications Release 7 and earlier releases.
All OTBI Subject Area names in FSCM and HCM end with “Real Time”.
Here is an example of an OTBI subject area with fact and dimension folders.
What is a Cross-Subject Area Analysis?
OTBI allows creating a report that combines data from more than one Subject Area. Such a query would
be referred to as a Cross Subject Area query in this document. We will discuss 3 different types of Cross
Subject Area queries and how the result set varies based upon what type of a query is being executed.
Cross Subject Area queries can be classified into 3 broad categories:
Before we discuss these three types of reports, it is important to distinguish between a common and a
local dimension. A common dimension is a dimension that exists in all subject areas that are being joined
in the report. For example, both “Workforce Management - Worker Assignment Real Time" and
“Workforce Management - Worker Assignment Event Real Time" subject areas have Worker, Job,
Department etc. available for use in the respective subject areas. These are considered common
dimensions between these two subject areas and can be used to build a Cross Subject Area report. On the
other hand “Worker Assignment Details” dimension in the “Workforce Management - Worker
Assignment Real Time" subject area is not available in the “Workforce Management - Worker
Assignment Event Real Time" subject area, therefore it is a local dimension for the purposes of a Cross
Subject Area query between these two subject areas.
Next we will examine the three types of reports mentioned above in more detail.
If your report requirements cannot be met by any single subject area because you need metrics from more
than one subject area, then you can build a Cross Subject Area report using common dimensions. There
are clear advantages to building a Cross Subject Area report using only common dimensions and we
highly recommend using this approach to build your Cross Subject Area queries if possible. Note that for
a dimension to be common between 3 subject areas being pulled into a report, it must exist in all 3 subject
areas. You can use any metric from either subject area in your report. Joining on common dimensions
gives the benefit of including metrics from multiple subject areas in a single report. As mentioned earlier,
each subject area has one folder that contains metrics and usually has the same name as the Subject Area
(minus Real Time).
While Answers gives a user the flexibility to create a report joining any subject area the user has access
to, one must understand that only a Cross Subject Area query that uses common dimensions would return
data that is at the same dimension grain and hence can be cleanly merged resulting in a report that returns
exactly the data you are looking for. See Report 1 below for an example of a report that is at the grain of
the worker dimension.
It is important to understand how Cross Subject Area queries are executed in BI to fully understand the
importance of using common dimensions when building such a report. When a Cross Subject Area report
is generated in OTBI, Oracle BI executes separate queries for each subject area in the report and then
merges the results to generate the final report. The data being returned from the different subject areas is
merged using these common dimensions. If you have used common dimensions, the result set returned by
each subject area query would be at the same dimensional grain and hence can be cleanly merged and
rendered in the report. The following examples explain this behavior in detail.
Here are two examples of a Cross Subject Area query that reports on metrics coming from two separate
facts (separate subject areas) and using common dimensions.
Report 1.
Cross Subject Area report on Worker Assignments and Assignment Events to fetch a count of
Assignments, and # of hire and promotion events for a worker.
SELECT
0 s_0,
"Workforce Management - Worker Assignment Real Time"."Worker"."Employee First Name" s_1,
"Workforce Management - Worker Assignment Real Time"."Worker"."Employee Last Name" s_2,
"Workforce Management - Worker Assignment Event Real Time"."Assignment Event"."# Of Hires" s_3,
"Workforce Management - Worker Assignment Event Real Time"."Assignment Event"."# Of Promotions" s_4,
"Workforce Management - Worker Assignment Real Time"."Worker Assignment"."Assignment Count" s_5
FROM "Workforce Management - Worker Assignment Real Time"
WHERE
(("Worker"."Employee First Name" = 'George') AND ("Worker"."Employee Last Name" = 'Weasley'))
ORDER BY 1, 2 ASC NULLS LAST, 3 ASC NULLS LAST
FETCH FIRST 65001 ROWS ONLY
Report 2.
Cross Subject Area query to fetch worker assignment and salary information.
Metrics:
“Worker Assignment Real Time” subject area: Headcount
“Salary Details Real Time” subject area: Current Salary, Annualized Salary, Previous Salary, Days Since
Last Salary Change.
SELECT
0 s_0,
"Compensation - Salary Details Real Time"."HR Grade"."Grade Name" s_1,
"Compensation - Salary Details Real Time"."Worker Location"."Worker Location Name" s_2,
"Compensation - Salary Details Real Time"."Worker"."Employee Full Name" s_3,
"Workforce Management - Worker Assignment Real Time"."Location"."Location Address" s_4,
"Compensation - Salary Details Real Time"."Salary"."Annualized Salary" s_5,
"Compensation - Salary Details Real Time"."Salary"."Current Salary" s_6,
"Compensation - Salary Details Real Time"."Salary"."Days Since Last Salary Change" s_7,
"Compensation - Salary Details Real Time"."Salary"."Previous Salary" s_8,
"Workforce Management - Worker Assignment Real Time"."Worker Assignment"."Head Count" s_9
FROM "Compensation - Salary Details Real Time"
WHERE
("Salary"."Current Salary" IS NOT NULL)
ORDER BY 1, 4 ASC NULLS LAST, 2 ASC NULLS LAST, 3 ASC NULLS LAST, 5 ASC NULLS LAST
FETCH FIRST 65001 ROWS ONLY
As we are only using common dimensions the resulting report is at the grain of Worker, Grade and
Location with one record per worker, grade and location combination.
Guidelines for creating a Cross-Subject Area Analysis using multiple
Subject areas and common dimensions
Here are some guidelines and best practices when building Cross Subject Area reports. This list should
also be used to troubleshoot issues with Cross Subject Area reports. Make sure the following guidelines
have been followed if you run into issues building Cross Subject Area reports.
o If all the metrics and attributes needed for the report are available in a single subject area and
fact, use that subject area only and do not create a Cross Subject Area query. Such a report
will perform better and will be easier to maintain.
o When joining two subject areas in a report, make sure at least one attribute from a common
dimension is used in the report.
o When using common dimensions always pick attributes from the common dimension from a
single subject area. For instance if you are using “Worker” dimension to build a query
between subject area 1 and subject area 2 then pick all worker dimension attributes from
subject area 1 or 2. But not some worker attributes from subject area 1 and some from subject
area 2. In some scenarios, the common dimension may have more attributes in one subject
area vs the other. In such a situation you can only use the subset of common attributes in a
Cross Subject Area query.
o Always include a measure from each subject area that is being used in your report. You don’t
have to display measures or use them. But you should include a measure in the report
nonetheless and hide it if it is not needed in the report.
o When using scalar metrics like percentage or average values (metrics that don’t have
aggregation function defined on them) make sure you add an aggregation like MAX. For
example, Calculated Manager Overall Rating from Performance Rating Subject area needs an
aggregation function.
You can do this by either editing the column property and adding a function or by navigating
to the “Advanced” tab in Answers and wrapping the column name with the “”max” function.
The end result should be the following logical sql:
Note that the patch for bug 16538633 will fix this issue. If you have this patch applied then
you will not need to treat scalar metrics as explained above. Scalar Metrics show up in the
fact folder with a white icon as shown in the following screenshot.
Building Cross-Subject Area Reports using Common and
Local Dimensions
Configuration/Setup Required for Cross Subject Area reports to work
Before you generate any Cross Subject Area reports please review the following section to understand the
configuration and report changes required to get such reports to work. You will also need to make sure
you have the appropriate patches applied on the instance.
The following two configuration changes are required for Cross Subject Area reports to work:
For details about how to do these configuration changes please see Appendix A.
You will also need some patches from OBIEE and BIApps. For a list of patches see Appendix B.
Without doing the config/setup changes described in Appendix A and patches mentioned in Appendix B,
cross-subject area reporting is only supported for common dimensions, dimensions that exist in all subject
areas included in the report. If you are getting an error when running such a report or not getting expected
results please check your setup and ensure all patches are applied.
Here is an example of the report behavior you should expect to see if the necessary setup changes and
patches are not applied on your instance.
Continuing with our Assignment and Assignment Event example in Report 1, if I add attributes from
“Assignment Event Details” (not a common dimension) from the Assignment subject area into our Cross
Subject Area query, the Assignment Count which comes from the Worker Assignment subject area is cast
to NULL and returns 0 for count as seen in the screenshot below. In some scenarios the query may fail.
Report 3.
SELECT
0 s_0,
"Workforce Management - Worker Assignment Event Real Time"."Assignment Event Details"."Assignment Number" s_1,
"Workforce Management - Worker Assignment Event Real Time"."Assignment Event Details"."Assignment Sequence" s_2,
"Workforce Management - Worker Assignment Event Real Time"."Assignment Event Details"."Assignment Status Type" s_3,
"Workforce Management - Worker Assignment Event Real Time"."Assignment Event Details"."Assignment Type" s_4,
"Workforce Management - Worker Assignment Event Real Time"."Worker"."Employee First Name" s_5,
"Workforce Management - Worker Assignment Event Real Time"."Worker"."Employee Last Name" s_6,
"Workforce Management - Worker Assignment Event Real Time"."Assignment Event"."Assignment Event Count" s_7,
"Workforce Management - Worker Assignment Real Time"."Worker Assignment"."Assignment Count" s_8
FROM "Workforce Management - Worker Assignment Event Real Time"
WHERE
(("Worker"."Employee Last Name" = 'Weasley') AND ("Worker"."Employee First Name" = 'George'))
ORDER BY 1, 2 ASC NULLS LAST, 3 ASC NULLS LAST, 5 ASC NULLS LAST, 4 ASC NULLS LAST, 6 ASC NULLS
LAST, 7 ASC NULLS LAST
FETCH FIRST 65001 ROWS ONLY
Once you do the setup mentioned in Appendix A and apply the patches from Appendix B the same query
will give correct results as shown below.
Report 4.
We will continue with the same example from Workforce Management Subject areas and see how adding
additional local dimensions will change the result set being returned.
In Report 4 we have added additional columns from the Assignment Event Details folder. As you recall
this is a degenerate dimension that is local to the Worker Assignment Event subject area. Because we
have changed the grain of the report we are getting a number of rows for the different actions for the same
worker. The metrics are simply repeated for each of these rows.
Report 5.
How results returned from the individual Cross Subject Area queries may
not get merged the way you would want.
We will continue with our example of a Cross Subject Area query on Worker Assignment and
Assignment Events to illustrate this point.
Let’s look at the results we get from each subject area when we run a report on that specific subject area
and then we will analyze how the results may end up getting merged and what can be done to address this
issue and avoid a Cartesian join.
This report returns 2 assignment events for the first assignment and 5 for the second assignment.
If we were to simply join these 2 subject areas in a Cross Subject Area report then we only have the
worker as a common dimension in such a Cross Subject Area query and you will end up with a report that
returns a Cartesian join of the 2 result sets above as shown below:
There are a couple of ways to address this problem and we’ll discuss these below but this example
highlights why it is important to analyze the results carefully if you are not using conformed dimensions
in a Cross Subject Area report.
Solution 1.
Restrict the result set from the first subject area so you only get a single active assignment. This can be
done by restricting the records to only ACTIVE assignment.
Solution 2.
If you need both ACTIVE and INACTIVE assignments from the Assignment subject area then you can
use a UNION operator to generate 2 separate queries and merge the results to avoid the Cartesian join.
You can use the assignment number or sequence to do this. See next section, “How to Create a Cross-
Subject Area Analysis Using Set Operations”, for details on how to construct such a report.
Solution 3.
This is a more generic solution and would work in most such cases. It does involve understanding how
OBIEE logical query is constructed and how to join two 2 logical queries on common dimension
attributes.
Here is the logical sql that queries the two subject areas separately and then joins the result sets on
Assignment number.
The following example is a compound Analysis query that is a union of two result subsets combining
employees’ personal status change from Person subject area (result 1) and assignment changes from
Worker Assignment subject area (result 2). As the two subject areas are not joined in a single result, this
compound analysis will execute successfully.
Appendix A.
After this change the new xml snippet would look something like:
(4) Copy and paste the following in this box (see screenshot below):
Once variable is set in the prefix box, and you click the “Apply SQL”, this set command is appended
to the Logical query.
Appendix B.
The following patches are needed for the specified releases to get Cross Subject Area queries working.
BIApps Patches.
Subject Area:
OTBI organizes reporting data elements like Dimensions and Facts by business function in Subject Areas.
Each Subject Area contains a collection of dimensions and a single fact related to a functional area.
Degenerate Dimension:
Such a dimension comprises the attributes from a fact and is at the same grain as the fact.
Grain of a Report:
By grain we are referring to the dimensionality of the report. For instance a report showing department
data is at the grain of a department. A report showing department and worker data is at the grain of a
worker.
Scalar Metric:
These are measures or metrics that do not have an aggregation rule defined for them. For example a
percentage measure would not have an aggregation rule as we do not want to sum up percentage values in
a report.
Aggregation function:
These are functions like SUM, COUNT etc that are applied on measures when aggregating for the
dimensions in the report.
STAR Schema:
A STAR schema comprises of a single fact joined to n number of dimensions.
Cartesian join:
A Cartesian join is executed between two tables when no join condition exists between them. The result
set is a product of the rows returned from each table.