Now we have introduced the rudimentary basics of creating an analysis, let's look at the options when building effective analyses in more detail.
First, we need to create a new analysis to work on, in the same way we did in the preceding section:
The page you are presented with has the following sections (marked here with green squares):
.rpd
file. Normally, you would use a single Subject Area, but you can add other Subject Areas by clicking on the little box icon. Subject Areas will consist of Measures that are on one or more Fact tables, and attributes, that come from one or more dimensions. The Subject Area was defined in the .rpd
file.Filters can be saved for use in other analyses. This means that several analyses can use the same shared Filter which saves time if you need to make a change to the filtering.
Let's explore the options available on each column:
Brand
from the Products
folder in the Subject Areas panel by double-clicking it. It will appear in the Columns panel.
You are presented with the following dialog box that has the available columns on the left panel, the main formula box on the right, and some quick link buttons at the bottom:
For now, we will enter a formula directly into the box:
"Products"."Brand"
into the preceding formula box.Brand
column is now, Brand
, so let's change the title to something more friendly:Brand
:
Note that Suppress is selected, which means that if two rows have the same value, they are merged into one box.
To explore the other Column Properties options, we will add some more columns into our analysis:
Calendar Date
column twice to add it to our analysis.Revenue
column.Column Style
Data Format
Now we will change the way the information in the Date
column is presented:
Calendar Date
column, set the Date Format option as Custom and enter dddd
into the Custom Date Format box:
Conditional Format
Next, we will explore how to change the format of the data presented, based upon a condition. For example, make Revenue
numbers red if they are below 1,000 and green if they are above 5,000:
Revenue
column.Revenue
.1000
:
Revenue
.Let's see all those formatting changes now:
Interaction
The next column property to explore is the Interaction tab. This enables users to interact with the data they see, perhaps to see more details or view a web page. We will use an example link to a page on a Dashboard:
Revenue
column.
Shared FoldersSample LiteDashboardsQuick StartSales Summary
).At this stage, we need to save our work, so let's save it as Analysis Two
in the Book
folder:
Book
folder.Analysis Two
.Now you can test the link by running the report (click on the Results tab) and click on one of the Revenue
numbers. It will now load the Sales Summary page.
Reopen our Analysis Two
by clicking on the breadcrumb link in the bottom left-hand corner.
Continuing with the Column options available...
Filters are used to pre-select data. You can use them to limit your results sets, and you can use them to allow users to limit results on a Dashboard. Let's see them in action:
Brand
column.This opens the Filter dialog box.
You can now click on the Value box and it will display available values:
When you run the results now, only Biztech brands will be listed.
Filters can also be applied to columns that are not displayed in your analysis. In the bottom panel, you can see a Filter button (looks like a funnel).
It will open the Select Column dialog:
Per Name Year
from the Time
folder.2008
in the Value box.To create a SQL Filter, you tick the box Convert to SQL and press OK. This will display a SQL statement that represents the Filter you have created.
We will add some more columns to our analysis now. Find the column in the left-hand panel and then double-click it or drag to the right-hand panel:
Per Name Year
between the Brand
and Calendar Date
columns.# Of Orders
from the Calculated Facts
folder.We now have an analysis ready to go:
After you have saved your work, let's see what it looks like:
You can now see a title and a table with our columns in. In the bottom-left panel (called Views) we can see the title and table object. Each analysis can have multiple views, including multiples of the same type.
As you build different views of your data, they are listed in the Views panel. You can add the same type more than once, for example, two Pivot Tables could be created, one with Years in columns, the other with Quarters.
Views each have their own container which have layout and style properties. Looking at Analysis One
, we can see that the default horizontal alignment for a table container is to the center.
Let's examine some of the most commonly-used views.
By default, you get one table.
The default properties for a table are that the column headings are fixed, and there is a scroll bar on the right side for viewing results further down the dataset. If we had lots of columns in our analysis, then only the first few would be visible, but there will be another scroll bar at the bottom to view more columns. There are alternative settings that we can set.
We will now edit the properties of the table:
This will open the Edit Table View page:
On this page, we can change what columns are presented, in what order, and where in the view. Note the Table Prompts, Sections, and Excluded boxes. In the preceding image, we are only showing the Layout and Selection steps. You can show or hide parts of the editor using the icons on the menu bar:
5
into the Rows per Page box.
We will now move some columns around to see the effect:
Per Name Year
column to the Table Prompts box.Day
column to the Excluded box.Now add a total row at the bottom of the table:
Let's see the results:
Try changing the Year Prompt and you will see the results changing.
Click on the small Graph button on the top bar.
This displays all the possible ways of viewing the data we can retrieve in our analysis. In the following image we show the different types of Bar Graphs that are available:
Like tables, Graphs have Prompts, Sections, and Exclude boxes:
Year
column to the Sections box.Date
column to the Horizontal Axis.
Your analysis now has three views on the page, a title, a table, and a Line Graph.
Pivot Tables are used to move values into columns, just like in Excel.
Here we show a pivot table with Brand
in rows, and Year
in columns. Pivot Tables also have Prompts, Sections, and Excluded boxes:
The preceding is created in a new analysis:
Brand
, Per Name Year
, and Revenue
.Year
column to the Columns
section:
Analysis Three
.Narrative views are very useful for when you want to present your data in a precise manner, usually (but not always) using HTML and CSS. We can mix words, images, and column data to produce impressive output.
A simple narrative example:
Analysis Three
and go to the Results tab.<font size=3>[u]Summary[/u]</font>[br/][br/]
.[b]@1[/b] Sales in [b]@2[/b] were $@3[br/][br/]
.
As you can see, Narrative views can provide flexibility in how one presents data.
Performance Tiles present a single number in a box. This can be a very effective way to get an import measure presented to users. Any measure that is within an analysis can be used in a tile. We will create a new example analysis to explore performance tiles and also introduce the Filter By
function:
Revenue
column four times.Per Year Name = 2010
(note we do not need the Year
column in the analysis.Revenue
column.You should now have a screen like shown in the following screenshot:
The formula is set so that it will sum the Revenue
column where the "Brand" = Biztech
. Your formula will now look as follows:
FILTER("Base Facts"."Revenue" USING ("Products"."Brand" ='BizTech'))
Biztech Revenue
.Revenue
column - this time we will sum the Target Revenue
. Set the formula to:FILTER("Base Facts"."Target Revenue" USING ("Products"."Brand" = 'BizTech'))
BizTech Target
.Revenue
column. Create a variance percentage column which will show the percentage actual Revenue
is under, or over, Target Revenue
. Set the formula to:(FILTER("Base Facts"."Revenue" USING ("Products"."Brand" = 'BizTech')) - FILTER("Base Facts"."Target Revenue" USING ("Products"."Brand" = 'BizTech'))/ FILTER("Base Facts"."Target Revenue" USING ("Products"."Brand" = 'BizTech')))*100.0
Variance
.Now change the Data Format of the Variance
.
Variance
column.Before we move on, we will add a conditional format on the variance column. We will create a simple red format when the Revenue
is less than the Target Revenue
. First, values less than zero, that is, poor performance against the target.
Variance
column from the list.0
(zero) into the Value box.#ff8080
(you enter this directly into the box).Now values more than 10 percent, that is, good performance against target.
Variance
column from the list.is greater than
and put 10
into the Value box.#669966
(you enter this directly into the box).Analysis Four
.That's the data created, we will now add a Performance Tile:
Variance
column.Revenue vs Target
:
We now have a Performance Tile which can be added to the page.
Experiment now with different Years to see the results:
Year
to 2008
.You should now see a green box instead of a white one:
So far in this chapter, we have covered creating a simple analysis, adding a Graph, and saving as Analysis One
. We then created a Dashboard and put our Analysis One
onto a page. Next, we looked at column sorting, formulae, and column properties, which included the Data Formats, Conditional Formatting, and Interaction features. We also reviewed the most common views that an analysis can present; tables, Graphs, Pivot Tables, narratives, and Performance Tiles.
There are 46 different view types in OBIEE 12c, so you should take some time to experiment with some of those we haven't covered in detail. Check out the Heatmap view and Gauge views for yourself.
In the next part of this chapter, we will look at how you present your analysis on Dashboard pages, and how users can interact with your Dashboards.
In most of our example analyses, we have been setting Filters for specific values, for example, we added the Filter Per Name Year is greater than 2008
into Analysis Two
.
Instead of predetermining what Year
the user would like to see, we can give the user the option of choosing the Year
when the analysis is run. This turns a static analysis into an interactive analysis.
There are two ways to make an interactive analysis, either ask users within the analysis, by using the Prompts tab, or by placing the analysis onto a Dashboard which has a Dashboard Prompt
object on it.
We will now examine the Prompts held within an analysis:
Per Name Year
, Per Name Quarter
, and Revenue
.Per Name Year
.Choose Year
.2009
.
Analysis Five
in the Book
folder.
Analysis Five
is listed in the recent section.
Analysis Five
:
The analysis will now open with the Prompts page. You select the Years you are interested in seeing and when you press OK, the results will appear.
We can also see similar behavior when we place the analysis onto a Dashboard page:
Page Two
in the Page Name box.Analysis Five
from the Catalog
onto the page.Year
from the Prompt box and click OK.Now we will look at the other method, using a Dashboard Prompt object on the Dashboard.
There are two tasks when creating an interactive Dashboard. First, you make your analysis responsive by adding Filters, and then you create a corresponding Prompt on the Dashboard Prompt object. The good news is that you can set a column to any of the available Prompt types, including a simple Is Prompted option.
A column in an analysis will only respond to a Dashboard Prompt if the column has a Filter.
We will create the analysis first, which will be similar to Analysis Five
:
Per Name Year
, Per Name Quarter
and Revenue
.Per Name Year
column.
Analysis Six
.Now we create a Dashboard Prompt:
Sample Sale Lite
Subject Area.Per name Year
column.
Book
folder as Prompt One
.Now we have created the two ingredients, let's put them together on a Dashboard page.
Page Three
.Prompt One
onto the page, and then the Analysis Six
below it:
Experiment by selecting different Prompt values and pressing Apply. See how the results change depending upon what values you choose.
Remember, only columns that have a Filter on will respond to a Dashboard Prompt.
All of the analyses we have built so far have used the default way of presenting the results. The default place to see results is on the Compound Layout screen. This is a results page that has our views on. We can choose which views to place on the compound layout, and we can also create more than one compound layout screen.
To demonstrate this feature, we will create a new analysis, and on this analysis, we will create three separate layouts. We will then place these on a Dashboard page:
Per Name Year
, Brand
, Product
, Revenue
, Target Revenue
.Analysis Seven
in the Book
folder.By default, you will see a title and a table view. We will now create a few more views so that we can place them on different layouts.
Brand
and Products
columns to the excluded section.
Year Totals Table
.Brand
in the Prompts section, Year
in the Group By section and Measure Labels in the Vary Color by section.Revenue Lines graph
.We now have four views; one title, two tables and one Graph view.
Now we will create a new layout:
When you create a new layout, the system will automatically create a new title view:
Year Layout
.Year Total
table over below the title.Graph Revenue Layout
.Revenue Lines graph
.Analysis Seven
.The analysis is now ready to place on a Dashboard:
Compound Example One
.Analysis Seven
onto the new page.
What you are now looking at is the Year Totals Table and a title which are both on the Compound Layout - Year Totals Layout.
So far, we have viewed analysis results on the Dashboard page. Another option when viewing Analysis results from a Dashboard is to launch the analysis from the page and view in another window.
Let's see this in action using Analysis Seven
, and also introduce the new 12c feature of sub pages:
Example Sub Page
.Analysis Seven
onto the sub page.
All we see now is a link. To view the results, click on the link and a window will pop open showing the Graphs.
One feature to explore while we are here, is the Report Links option on the properties menu.
Report links are presented at the bottom of the view and can be customized for each view. The users' favorite link is the Export one!:
Add the links as shown above, then re-run the page and you will see the links at the bottom.
When we run a Dashboard page, we sometimes want to switch views quickly but stay on the page. The good news is that there is a feature for that in the analysis views:
Analysis Seven
in edit mode.View Selector
(from the other views link).Select View
).
Selector Example
.Analysis Seven
onto the page.View Selector 1
.
Now you can switch views quickly.
When we place a view on a Dashboard, we set the default columns that are displayed. We can allow users to show columns that are excluded from the view, or exclude columns from the view.
To enable column hiding, set the Interaction Properties (available on the Analysis Properties):
One of the best aspects of OBIEE is the ability to direct the user to the most useful information. Sections on a Dashboard page can be hidden or displayed conditionally. The condition can be a specific analysis or can be a saved condition object.
We will put together an example using the condition object. The steps will be the following:
Let's get on with it:
Per Name Month
and Revenue
.Year
column, set it to 2011 / 12
.Revenue
column, set it to less than 100000
.Analysis Eight
:
Now create the condition:
Analysis Eight
.Condition One
.Next, we create the Dashboard Prompt:
Per Name Month
.Prompt two
.Putting it all together:
Book
folder:
We will add some content into the section. A simple message will be sufficient in this example. You can add anything into a conditionally displaying section.
You will now see a blank page!
The condition returned false, because there are no records for 2011 / 12.
To prove it will show when Revenue
is low, let's add another section:
Prompt Two
into the second section.Analysis Eight
into the second section.
Default: you will see no results.
2008 /10
.Our sales message appears!
We just built a Dashboard page that can conditionally display a section, depending upon the result of a condition, which is the checking of results of an analysis. We choose a simple example but this could be useful to highlight something to users that needs to be addressed, for example, sales orders not yet processed.
Conditionally displaying results means your users are informed when they need to be, and not when they don't. This changes the way people interact with their data. Do not give them all the data to determine what is good or bad, but present the messages that you need them to act on.
OBIEE is not just for presenting historical Graphs. OBIEE is great for day to day operational use, reporting to users any type of information that they need to do their job. We like to use the phrase, "It is better to see the bunny in the headlights, than the roadkill in the mirror"!
When presenting more than one analysis on a Dashboard page, you can link them together using the Master Detail feature. One analysis will be the master, and the other, the detailed analysis.
We will put together an example. The steps will be:
Let's get on with it:
Per Name Year
, Per Name Month
and Revenue
.Per Name Year
Column Properties.Year
column value to Send Master-Detail Events.salesyear
.Analysis Nine
:
Now we create the child views:
Year
column into the Prompts section.salesyear
into the Channel box.
The analysis is now ready to use. We will demonstrate it on a Dashboard page:
Master Detail Example
.Analysis Nine
.Table 1
.The above setting will place the second column to the right of the first one:
Analysis Nine
onto the page again, into the second column.Now, when you click on a Year
in the table, the Graph will automatically update. Note that we could have also created a different analysis to listen to the Master Detail channel.
When a Dashboard is loaded, the query runs with the default values if there are defaults set. This may not suit the user, so they set the Prompt to the value of their choice, for example, their office or region. The next time the page is run, the user does not want to have to repeat the process again, so they can save the settings applied. This is simply done by using the Dashboard properties wheel, and selecting the Save Current Customization option:
Select the Use as default option and your Filters will be applied automatically when you run the page. You can save many customizations, and switch between them using the Apply Saved Customization option in the menu.
So far, we have mainly used simple presentation of columns that are available in the Subject Area. We introduced the formula editing feature when we used the UPPER()
function, and there are large number of functions available which can create a calculated result in a column. There is also a method available to calculate row totals.
Let's look at some typical calculations:
SUM
: You can sum any numerical column, from any of the folders, although you would normally operate on measure columns.A typical SUM
calculation would look as follows:
SUM("Base Facts"."Revenue" )
You can also set a level to aggregate by, for example a Year or a brand:
SUM("Base Facts"."Revenue" by "Time"."Per Name Year")
A typical use for the above calculation would be to create a Percentage
column:
("Base Facts"."Revenue" / SUM("Base Facts"."Revenue" by "Time"."Per Name Year"))*100.0
Now we will create an analysis to demonstrate the function:
Per Name Year
and Brand
.Revenue
five times.Revenue
column, and change it to SUM("Base Facts"."Revenue" by "Time"."Per Name Year")
.Revenue By Year
.Revenue
, and change it to SUM("Base Facts"."Revenue")
.Revenue
, and change it to ( "Base Facts"."Revenue" / SUM("Base Facts"."Revenue" by "Time"."Per Name Year")) *100.0
.% of Year
.Revenue
, and change it to ( "Base Facts"."Revenue" / SUM("Base Facts"."Revenue" by "Time"."Per Name Year")) *100.0
.% of Year
.Year
column and for the Columns (both After).Analysis Ten
:
You can see that the Revenue by Year
total is repeated for each row of the Year
, but the Sum of Revenue
is repeated for every row.
You can also use the Aggregate Function to get a measure column total, for example "Base Facts"."Revenue"/Aggregate("Base Facts"."Revenue" BY)*100.0
would also provide the overall percentage.
TimestampDiff
: A function that work with dates and times, it calculates the difference between two dates, and presents the result in Years, Months, Weeks, Days, Hours, Minutes or Seconds.The format is as follows:
TimestampDiff(interval, date 1, date 2)
, where interval is one of the following:
SQL_TSI_SECOND,
SQL_TSI_MINUTE,
SQL_TSI_HOUR,
SQL_TSI_DAY,
SQL_TSI_WEEK,
SQL_TSI_MONTH,
SQL_TSI_QUARTER,
SQL_TSI_YEAR.
We often use the function to Filter data for relative dates, for example, display the Total of Sales for the last two months.
TIMESTAMPADD
: TIMESTAMPADD
is similar to the TimeStampDiff
function, but it returns a date. You add or subtract an interval (For example, Week) to a date. The same list of intervals is used. The format is as follows:TIMESTAMPADD(interval, number of intervals, date 1)
If the number of intervals is negative, then you are subtracting from date 1
. The example is as follows:
TIMESTAMPADD(SQL_TSI_DAY, -1, date '2010-12-30')
This will return the day before 30th December 2010.
Let's create an analysis using the timeStampDiff
function:
Calendar Date
twice and Revenue
.TIMESTAMPDIFF(SQL_TSI_WEEK, "Time"."Calendar Date", date '2010-12-30')
Week
.Week
column, set it to less than 6
.Week
column.Analysis Eleven
:
This example shows the trend of sales over 6 rolling weeks from December 30, 2010.
At this point, it is also worth mentioning the special functions of CURRENT_DATE()
, CURRENT_TIME()
, CURRENT_TIME()
, and NOW()
. Current date will return a date that relates to the server, without any time components. Current time will only return the time on the server, without any date element. Current_Timepstamp
will return both the date and time. Now is exactly the same as current time-stamp.
These functions can be useful in creating a reference point for your other functions. For example, you may want to see the sales for the last three days, in which case you would use the function TIMESTAMPDIFF(SQL_TSI_DAY, "Time"."Calendar Date", CURRENT_DATE)
and set a Filter on this column for less than four.
RCOUNT
: This useful function provides the user with a row count column in the results. Use RCOUNT(1)
to have a simple row count for each row of the results. You can also use a group by clause in the functions, for example, RCOUNT(1 BY Per name Year)
will reset the counter to one each time the Year
changes.This function can be useful to just display a small sample of the results, by having a Filter on the RCOUNT(1)
:
TopN
: This is a combination of a Filter and a function at the same time. It determines the order of a measure, by its value from highest to lowest, and then Filters your recordset for the top N. For example, you can see a list of the top 10 months by Revenue
using: TOPN("Base Facts"."Revenue",10)
. If you just want to see how a number ranks overall, then set the Filter number to be larger than the expected number of total result rows. BottomN
is similar to TopN
but ranks from smallest to largest.NTile
: NTile(number,scale)
arranges numbers on a scale are presents where the row lies on the scale. For example, if you had a list of month numbers and used a scale of 6, that is, NTILE(Month Number, 6)
, then January and February will be ntile 1, March and April will be 2, May and June will be 3, and so on.Let's demonstrate this using Analysis Ten
as a starting point:
Analysis Ten
.Analysis Twelve
.
Biz and Home
.You will now see a new row added to the table view, called Biz and Home, which shows the totals for those two brands only.
One of the cool new features in OBIEE is the ability to create a column and save it for use elsewhere. This feature enables a column to be created once and used in multiple analyses. Better still, any updates to the column can be made in one place and all analyses will reflect the changes.
Let take a quick look at Saved columns:
Office
column.LEFT("Offices"."Office", 1)
.H
in the Value box.A-G
.Office_Group
.Book
folder. You will get a warning message about the location, you can safely ignore the message.So, we now have a column created, and you can edit it as a stand-alone object. Navigate in the catalog to the Book
folder and you will see the column you just created. You can right-click on it and you get two edit options, the formula or the Properties.
Now we will use the column:
Book
folder and click on the Office_Group
object.Revenue
column.Analysis Thirteen
.18.224.59.145