Friday, 14 November 2014

Current Year and Previous Year in Prompt

SELECT YEAR(CURRENT_DATE) FROM "Human Resources - Workforce Profile" 
UNION
SELECT YEAR(CURRENT_DATE)-1 FROM "Human Resources - Workforce Profile"























Thanks,

Display last year data while selecting year in dashboard Prompt

Requirement is to display Current Year and Last Year data when select year from dashboard Prompt..

Steps:
Create a dashboard Prompt and set a presentation variable
























Now create a Dashboard Report and call above presentation variable




































Create a dashboard with above report and prompt

Display Data of Last 4 Quarters

Requirement is to display data of last 4 Quarters,8 Quarters when user select Quarter from Dashboard Prompt,  Quarter format is 2014 Q 4 , 2013 Q 3 etc.

Steps:
First we will create a report(Control Report) which will give previous quarters data ,This Control report Columns will be called in Dashboard Report

Control Report:

















Column Formula of "Year Quarter"
User will select from Prompt

Column Formula of  "4 Quarter Ago" 
CASE WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='1' THEN CAST((CAST("Time"."Year" AS INTEGER)-1) AS VARCHAR(4))||' Q 1'  WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='2' THEN CAST((CAST("Time"."Year" AS INTEGER)-1) AS VARCHAR(4))||' Q 2' WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='3' THEN CAST((CAST("Time"."Year" AS INTEGER)-1) AS VARCHAR(4))||' Q 3'  ELSE CAST((CAST("Time"."Year" AS INTEGER)-1) AS VARCHAR(4))||' Q 4' END

Column formula of "8 Quarter Ago"
CASE WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='1' THEN CAST((CAST("Time"."Year" AS INTEGER)-2) AS VARCHAR(4))||' Q 1'  WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='2' THEN CAST((CAST("Time"."Year" AS INTEGER)-2) AS VARCHAR(4))||' Q 2' WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='3' THEN CAST((CAST("Time"."Year" AS INTEGER)-2) AS VARCHAR(4))||' Q 3'  ELSE CAST((CAST("Time"."Year" AS INTEGER)-2) AS VARCHAR(4))||' Q 4' END

We now will call this report(Control Report)  in our Dashboard Report:
Filter in the Dashboard report is based on Control Report:

Dashboard Report:

















Dashboard Prompt is below :

















Below is the Dashboard when report and Prompt are taken place:





Sunday, 12 October 2014

Sorting of Grand Total Value in Pivot View

In a pivot view, you don't have any options to choose the sort order on any measure columns (column grand total include).
I figured it out a way,thought it might help you as well so posting this.

Example:  Arrange Total Transaction Amount USD Total in Descending Order
















Unfortunately, a pivot view is always sort by dimension so For that we need add another metric name it as sort with the measure 'Total Transaction Amount USD Total" in the below format

Add a new column in the report






and in the edit formula
CAST(RANK(SUM("Fact Table"."Total Transaction Amount USD" BY"Dimension Table"."Incurred by Person Name")) AS INTEGER)

and treat that column as an attribute column by clicking on the check box shown below:












Then in the report it will appear as below:  the Sort column is available in the report we can hide that by using Column Properties.

























Finally the report sorted by Descending order on Grand Total as below:

Thanks

Saturday, 5 July 2014

Difference B/W OBIEE 10g and 11g

  • OBIEE 11g uses WebLogic Server as the application server as compared to Oracle AS or OC4J in OBIEE 10g. 
  • The session variables get initialized when they are actually used in OBIEE 11g unlike OBIEE 10g where they were initialized as soon as a user logs in.
  • In 11g Users and groups are created in Enterprise Manager (EM) whereas in 10g Users and groups are created in repository.
  • New time series functions PERIOD ROLLING and AGGREGATE AT are introduced.
  • Timeseries function can be created in Answers as well.
  • Logical Table Source(LTS) Priority ordering is introduced.
  •  OBIEE Join is done from fact to dimension whereas in 10g join is done from dimension to fact.
  • A new column called the hierarchical column in introduced.
  • OBIEE 11g now supports Ragged (Unbalanced) and Skipped Hierarchy.
  • Parent Child hierarchy is introduced.
  • We can now model lookup tables in the repository.
  • SELECT_PHYSICAL command is supported in OBIEE 11g.
  • In OBIEE 11g we can create KPIs to represent business metrics.

    In OBIEE 11g there are some changes in terminology as well:

  • iBots are renamed as Agents.
  • Requests are renamed as Analysis.
  • Charts are renamed as Graphs.
  • Presentation Columns are renamed as Attribute Columns.
  • The new UI called Unified Framework now combines Answers, Dashboards, and Delivers.

       

Time Series Functions in OBIEE

1) Ago

Ago is a time series function that calculates the aggregated value from the current time back to a specified time period. this is useful for comparison  such as amount compared to amount a month ago.

Syntax:  AGO(<Measure >,<Level>,<number of period>)

Measure: A measure column.
Level: On which level you want to calculate this measure such as Year,Quarter,Month etc.
Number of period: how many level you want to go back from current time such as 2 year back,2 months back etc.

Example : AGO(Amount,Year,1) this will give the last year amount .

2) ToDate 

To Date is a time series function that calculates a measure attributes from the beginning of a specified time period to the currently displayed time period.

Syntax : ToDate(<Measure>,<Level>)

Measure: A measure column.
Level: On which level you want to calculate this measure such as Year,Quarter,Month etc.

Example : ToDate(Amount,Year) this will give the amount from the beginning of the year to Currently displayed time.

3) Period Rolling

Period Rolling is a new time series function in 11g .It computes the sum of a measure over the period starting x units of time and ending y units of time from the current time .This function allow us to create a aggregated measures across a specified set of query grain period rather than within a fixed time series grain.

Syntax: PeriodRolling(<Measure>,<Starting Period Offset>, < Starting Period Offset>)

Measure: A measure column.
Starting Period Offset: Starting period used in rolling aggregation.
Ending Period Offset: Ending period used in rolling aggregation.

Example : PeriodRolling(Amount,-2,0) this will give three months rolling sum of column Amount.It includes past two months with the current month. Numerical value -2 indicates May-14,Jun-14 if current month is Jul-14.Numerical value 0 indicates current month.

Note : This function has no time series grain ,the length of the rolling sequence is determined by query grain for example it will give the last three Month amount if the query grain is month , if the query grain is year then it will give last three Year Amount.



Repository and Session Variables

Session Variables: Session variables are created and assigned a value when each user logs on(when a new session is started). When a user begins a session, the Oracle BI Server creates new instances of session variables and initializes them.

There are two types of session variables:

1. System Variables: Oracle BI Server and Oracle BI Presentation Services use for specific purposes. 
System variables have reserved names, which cannot be used for other kinds of variables (such as static or dynamic repository variables, or for non-system session variables). 
Ex: To filter a column on the value of the variable LOGLEVEL set the filter to the Variable NQ_SESSION.LOGLEVEL.

2. Non System Variables: A common use for nonsystem session variables is setting user filters. For example, you could define a nonsystem variable called SalesRegion that would be initialized to the name of the sales region of the user.


Repository Variables :  A repository variable has a single value at any point in time.

There are two types of repository variables:

1. Static Variable: The value of a static repository variable is initialized in the Variable dialog. This value persists, and does not change until an administrator decides to change it.


2. Dynamic Variable : The values of these variables change with the values returned by queries. When the repository is started the value returned by the query in the initialization block will be assigned to the dynamic variable.

A fatal error occurred while processing the request. The server responded with: FOProcessor cannot run without a valid TMP directory. Please check if TMP directory exist and write enabled.

When attempting to export a Dashboard to Excel the following error message in sawlog is found: A fatal error occurred while processi...