SlideShare a Scribd company logo
1 of 95
Download to read offline
REMINDER
Check in on the
COLLABORATE mobile app
Create Bar Chart Report
for P6R8.x using BI Publisher 11g
Prepared by:
Paul G. Ciszewski, PMP
Dynamic Consulting
Session ID#: 15441
Overview
• Oracle Business Intelligence Publisher (BIP) is a tool to create pixel-perfect
reports
• To modify existing P6 EPPM Web Reports and to create new P6 EPPM Web
Reports, BIP is used
• When building your reports, you should use P6’s new Px Extended Scheme
(database)
• Px Extended Scheme is de-normalized and has P6 calculated values
Overview (cont.)
Tables in the Px Extended Scheme begin with “P6”
• P6Project – list of all projects and related data by project (for ex: the “baseline
planned labor units” for project “TA Fall 13”)
• P6ProjectSpread - list of all projects and related data by project and date (for ex:
the “planned labor units” on November 15, 2013 for project “TA Fall 13”)
• P6Activity – list of all activities and related activity data for all projects (for ex: the
“earned value labor units” for activity “A1000” for project TA Fall 13)
• P6ActivitySpread – list of all activities and related activity data by date for all
projects (for ex: the “actual labor units” for activity “A1000” on November 15, 2013
for project TA Fall 13)
• P6ActivityCodeAssignment – list of all the activity codes and their values
assigned to ALL activities. If an activity has 5 activity codes assigned to it, then
there would be 5 records in this table for the one (1) activity
• P6ActivityCodeType – list of all activity codes (referred to as Activity Code Types)
Note: There are no physical tables called P6Project (or P6Activity). The P6 tables are actually synonyms/aliases that
point to “Views”. “Views” are results from executed SQL statements. In the Px Extended Scheme, the “Views” are joins
of native P6 tables (such as project, task) and new extended tables (such as projectx and taskx) – and the P6 security
tables are included.
For our presentation “SYNONYM” is the same as “TABLE”
BI Publisher - Introduction
• Two (2) main steps to create a BIP report
1. Create Data Model – Using DM Editor to extract data from P6’s Extended
Px Scheme (database)
2. Create Report Layout – to present the data. But there are 2 tools to
create the presentation part:
 Report Layout Editor (web tool which is within BIP)
 Word Template Builder (a MS WORD add-on)
BI Publisher – Presentation Objective
Presentation Objective
Go through all the steps to:
1. Develop the Data 
Model (SQL) to extract 
the data from P6
2. Develop the Bar Chart 
Template in the WORD 
Template Builder that 
uses the Data Model
3. Upload the Template 
to the Report in BI 
Publisher
4. Move the Report and 
Data Model to the 
P6Reports folder
5. Run Bar Chart Report 
in P6 and produce the 
same output as you 
see on this slide
BI Publisher – Report Details
Report Details
1. The user selects a project and 
an activity code (such as Team)
2. The Data Model will group and 
sum all with the same Activity 
Code Value (such as ELEC)
3. Display values (such as Planed 
Hours and BL Start Date) based 
on group of activities with the 
same value (ELEC).
4. Create a bar (the gray bar) 
representing the earliest start 
date and the latest finish date 
for the group of activities with 
the same value (ELEC).
5. Create an inner bar (the red 
bar) representing the 
percentage of Earned Value for 
the group of activities with the 
same value (ELEC).
6. This report was designed to 
handle a 3 month project.  The 
hash marks are not 
dynamically created
BI Publisher - Login
• User Name should 
exist in P6
• The user’s security is 
applied
BI Publisher – Home Screen
BI Publisher – Create Data Model (DM)
Eight (8) components need to be created within the DM for our
example
1. Create 2 List of Values (LOV)
2. Create 2 parameters
3. Create 4 Data Sets
See next slide for view of completed DM
BI Publisher – Create Data Model (DM)
BI Publisher – Create New DM
Check “Include Empty Tags 
for Null Elements” too.  
We want all data elements 
from the P6 DB even if the 
data elements are null
BI Publisher – Create New DM – P6 Tables
Five (5) P6 Tables needed to create DM
1. P6Project (list of projects and all related data)
2. P6Activity (list of activities and all related data)
3. P6ActivitySpread (list of activities and activity data by date)
A data set was included to determine the number of hours that was supposed
to be done up the data date (based on the baseline) but the data elements
were not used in our report. HOWEVER this extra data could be used to
expand the report.
4. P6ActivityCodeAssignments (list of ALL activity codes and their values
assigned to EVERY activity)
5. P6ActivityCodeType (list of ALL activity codes defined in your P6 DB)
BI Publisher – Create DM – Parameter
Desired “look and feel” in P6
BI Publisher – Create DM – Parameter
Desired “look and feel” in P6 for selecting a project
BI Publisher – Create DM – Parameter
Desired “look and feel” in P6 for selecting an activity code
BI Publisher – Create DM - Parameter
First create two (2) list of values (LOV)
• 1 for Projects and
• 1 for Activity Codes
BI Publisher – Create DM – Create LOV’s
SQL to retrieve the list of Project ID’s for 
projects that are active and that are currently 
being published sorted by Project ID
BI Publisher – Create DM – Create LOV’s
SQL to retrieve the list of Activity Codes with a 
scope of Global sorted by Activity Code name
BI Publisher – Create DM - Parameter
Next, create two (2) parameters
• 1 for Projects and
• 1 for Activity Codes
BI Publisher – Create DM – Create Parameter
“p_project_id” is special 
parameter recognized by P6
When “Parameter Type” is Menu, a “LOV” 
can be selected.
For our example, when the user runs the 
report, they can only select 1 project
BI Publisher – Create DM – Create Parameter
“p_activitycodetype is NOT is special 
parameter recognized by P6
When “Parameter Type” is Menu, a “LOV” can be selected.
For our example, when the user runs the report, they can 
only select 1 activity code
BI Publisher – Create DM – Data Sets
• Next, create the Data Sets
• Data Sets contain the SQL query/statements to extract the P6 data (such as the
projects data date and an activity’s baseline planned labor units) from the P6 tables
• In our example, we will create four (4) data sets which will be joined together
• In general, our data sets will sum and group activities using the activity code value
assigned to the activity (using the activity code selected)
BI Publisher – Create DM – Data Sets
4 Data Sets
• Totals Data Set (DS/G_1) – the result will be 1 record containing project level
data. In addition, this DS will determine the first Monday prior to the start of the
project (for titles on the report and for determining durations for number of bars)
• Chart Dates DS (G_3) – the result will be 1 record with 14 columns (14 columns
for 14 weeks for the bars). Each column will contain the date for the Monday of
that week.
• IndividualBars DS (G_2) – the result will be 1 record for each activity code value
for the activity code selected. This DS will group and sum activities together by
the activity code value. This DS will also determine the earliest start date and
the latest finish date for all the activities for 1 activity code value.
Continued on next slide
BI Publisher – Create DM – Data Sets
4 Data Sets (cont.)
• ActivitySpreadData DS (G_4) – the result will be 1 record for each activity code
value. This DS will determine how many baseline planned labor units (and %)
should have been completed by the data date. The results from this DS are
returned to the IndividualBars DS (G_2)
BI Publisher – Create DM – Create Data Set
Then select “SQL Query”
BI Publisher – Create DM – Create Data Set
More notes on next slide
BI Publisher – Create DM – Create Data Set
You could use “Query Builder” for simple SQL 
queries/statements.  
“Query Builder” builds the SQL query for us.
But for advanced/complex SQL 
queries/statements, I just type it in myself
BI Publisher – Create DM – Create Data Set
I typed in the SQL 
query/statement
BI Publisher – Create DM - Data Set / SQL for Totals/G_1
WITH DCGLBVALUES AS
(
-- Get the first Monday before the the earliest start date
-- for the project
-- BASICALLY, we get the earliest date - then
-- substract 7 from that date - then find the Next Monday
SELECT
TRUNC(NEXT_DAY(
TRUNC(
(SELECT
(CASE
WHEN TRUNC(PRJ.SUMBASELINESTARTDATE) < TRUNC(PRJ.STARTDATE) THEN
TRUNC(PRJ.SUMBASELINESTARTDATE)
ELSE
TRUNC(PRJ.STARTDATE)
END
) AS EARLIEST_PHASE_DATE
FROM P6PROJECT PRJ
WHERE PRJ.ID = :p_project_id
) -7
), 'MONDAY')) AS FIRST_MONDAY FROM DUAL
)
-- END OF DCGLBVALUES
SELECT PRJ.ID AS PRJ_ID,
PRJ.NAME AS PRJ_NAME,
PRJ.OBJECTID AS PRJ_OBJECTID,
PRJ.DATADATE AS PRJ_DATADATE,
PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS,
PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS,
PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS,
PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE,
PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE,
PRJ.STARTDATE AS PRJ_STARTDATE,
PRJ.FINISHDATE AS PRJ_FINISHDATE,
PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON,
DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0,
PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV,
-- Get dates for each monday up to 12 mondays
( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY,
-- Data Date offset
(CASE
WHEN (TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN
TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )
ELSE
0
END) AS PRJ_DATADATE_OFFSET,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(PRJ.SUMBASELINESTARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET,
TRUNC(PRJ.SUMBASELINEFINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET,
TRUNC(PRJ.STARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET,
TRUNC(PRJ.FINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION,
TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION
FROM P6PROJECT PRJ
WHERE PRJ.ID = :p_project_id
Totals/G_1 SQL Query
The result from this DS will 
be 1 record with the data 
elements for the project 
selected.
Data elements include the 
project name, data date, total 
planned labor units, etc.
This DS also determines the 
first Monday for the start of 
the project’s start date using 
the WITH clause.
The details are on following 
slides 
WITH DCGLBVALUES AS
(
-- Get the first Monday before the the earliest start date
-- for the project
-- BASICALLY, we get the earliest date - then
-- substract 7 from that date - then find the Next Monday
SELECT
TRUNC(NEXT_DAY(
TRUNC(
(SELECT
(CASE
WHEN TRUNC(PRJ.SUMBASELINESTARTDATE) < TRUNC(PRJ.STARTDATE) THEN
TRUNC(PRJ.SUMBASELINESTARTDATE)
ELSE
TRUNC(PRJ.STARTDATE)
END
) AS EARLIEST_PHASE_DATE
FROM P6PROJECT PRJ
WHERE PRJ.ID = :p_project_id
) -7
), 'MONDAY')) AS FIRST_MONDAY FROM DUAL
)
-- END OF DCGLBVALUES
SELECT PRJ.ID AS PRJ_ID,
PRJ.NAME AS PRJ_NAME,
PRJ.OBJECTID AS PRJ_OBJECTID,
PRJ.DATADATE AS PRJ_DATADATE,
PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS,
PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS,
PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS,
PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE,
PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE,
PRJ.STARTDATE AS PRJ_STARTDATE,
PRJ.FINISHDATE AS PRJ_FINISHDATE,
PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON,
DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0,
PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV,
-- Get dates for each monday up to 12 mondays
( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY,
-- Data Date offset
(CASE
WHEN (TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN
TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )
ELSE
0
END) AS PRJ_DATADATE_OFFSET,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(PRJ.SUMBASELINESTARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET,
TRUNC(PRJ.SUMBASELINEFINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET,
TRUNC(PRJ.STARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET,
TRUNC(PRJ.FINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION,
TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION
FROM P6PROJECT PRJ
WHERE PRJ.ID = :p_project_id
BI Publisher – Create DM - Data Set / SQL for Totals/G_1
Totals/G_1 SQL Query
WITH clause section will be reviewed on 
next slide
BI Publisher – Create DM - Data Set / SQL for Totals/G_1
WITH DCGLBVALUES AS
(
-- Get the first Monday before the earliest start date
-- for the project
-- BASICALLY, we get the earliest date - then
-- subtract 7 from that date - then find the Next
Monday
SELECT
TRUNC(NEXT_DAY(
TRUNC(
(SELECT
(CASE
WHEN TRUNC(PRJ.SUMBASELINESTARTDATE) <
TRUNC(PRJ.STARTDATE) THEN
TRUNC(PRJ.SUMBASELINESTARTDATE)
ELSE
TRUNC(PRJ.STARTDATE)
END
) AS EARLIEST_PHASE_DATE
FROM P6PROJECT PRJ
WHERE PRJ.ID = :p_project_id
) -7
), 'MONDAY')) AS FIRST_MONDAY FROM DUAL
)
-- END OF DCGLBVALUES
First_Monday
The With clause will return the results of the SQL 
in DCGLBVALUES.
The results of DCGLBVALUES are used in the next 
section of the data set
BI Publisher – Create DM - Data Set / SQL for Totals/G_1
Totals/G_1 SQL Query
The SELECT statement extracts data from 
P6Project and DCGLBVALUES.
In the next few slides, this SELECT 
statement will be dissected.  
WITH DCGLBVALUES AS
(
-- Get the first Monday before the the earliest start date
-- for the project
-- BASICALLY, we get the earliest date - then
-- substract 7 from that date - then find the Next Monday
SELECT
TRUNC(NEXT_DAY(
TRUNC(
(SELECT
(CASE
WHEN TRUNC(PRJ.SUMBASELINESTARTDATE) < TRUNC(PRJ.STARTDATE) THEN
TRUNC(PRJ.SUMBASELINESTARTDATE)
ELSE
TRUNC(PRJ.STARTDATE)
END
) AS EARLIEST_PHASE_DATE
FROM P6PROJECT PRJ
WHERE PRJ.ID = :p_project_id
) -7
), 'MONDAY')) AS FIRST_MONDAY FROM DUAL
)
-- END OF DCGLBVALUES
SELECT PRJ.ID AS PRJ_ID,
PRJ.NAME AS PRJ_NAME,
PRJ.OBJECTID AS PRJ_OBJECTID,
PRJ.DATADATE AS PRJ_DATADATE,
PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS,
PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS,
PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS,
PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE,
PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE,
PRJ.STARTDATE AS PRJ_STARTDATE,
PRJ.FINISHDATE AS PRJ_FINISHDATE,
PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON,
DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0,
PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV,
-- Get dates for each monday up to 12 mondays
( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY,
-- Data Date offset
(CASE
WHEN (TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN
TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )
ELSE
0
END) AS PRJ_DATADATE_OFFSET,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(PRJ.SUMBASELINESTARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET,
TRUNC(PRJ.SUMBASELINEFINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET,
TRUNC(PRJ.STARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET,
TRUNC(PRJ.FINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION,
TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION
FROM P6PROJECT PRJ
WHERE PRJ.ID = :p_project_id
BI Publisher – Create DM - Data Set / SQL for Totals/G_1
SELECT PRJ.ID AS PRJ_ID,
PRJ.NAME AS PRJ_NAME,
PRJ.OBJECTID AS PRJ_OBJECTID,
PRJ.DATADATE AS PRJ_DATADATE,
PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS,
PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS,
PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS,
PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE,
PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE,
PRJ.STARTDATE AS PRJ_STARTDATE,
PRJ.FINISHDATE AS PRJ_FINISHDATE,
PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON,
DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0,
PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV,
-- Get dates for each Monday up to 12 Mondays
( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY,
-- Data Date offset
(CASE
WHEN (TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN
TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )
ELSE
0
END) AS PRJ_DATADATE_OFFSET,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(PRJ.SUMBASELINESTARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET,
TRUNC(PRJ.SUMBASELINEFINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET,
TRUNC(PRJ.STARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET,
TRUNC(PRJ.FINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION,
TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION
FROM P6PROJECT PRJ
WHERE PRJ.ID = :p_project_id
Read the project’s data from P6Project for only 
the project id that was selected.
To use the value in a parameter, prefix the 
parameter name with “:”
BI Publisher – Create DM - Data Set / SQL for Totals/G_1
SELECT PRJ.ID AS PRJ_ID,
PRJ.NAME AS PRJ_NAME,
PRJ.OBJECTID AS PRJ_OBJECTID,
PRJ.DATADATE AS PRJ_DATADATE,
PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS,
PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS,
PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS,
PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE,
PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE,
PRJ.STARTDATE AS PRJ_STARTDATE,
PRJ.FINISHDATE AS PRJ_FINISHDATE,
PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON,
Here we are pulling in standard data elements 
from the P6Project table.
Some of these data elements (such as Project 
Name/PRJ_NAME and Last Published 
On/PRJ_LASTPUBLISHEDON) will be used 
directly on the report.
BI Publisher – Create DM - Data Set / SQL for Totals/G_1
SELECT PRJ.ID AS PRJ_ID,
PRJ.NAME AS PRJ_NAME,
PRJ.OBJECTID AS PRJ_OBJECTID,
PRJ.DATADATE AS PRJ_DATADATE,
PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS,
PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS,
PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS,
PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE,
PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE,
PRJ.STARTDATE AS PRJ_STARTDATE,
PRJ.FINISHDATE AS PRJ_FINISHDATE,
PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON,
DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0,
PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV,
-- Get dates for each Monday up to 12 Mondays
( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY,
-- Data Date offset
(CASE
WHEN (TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN
TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )
ELSE
0
END) AS PRJ_DATADATE_OFFSET,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(PRJ.SUMBASELINESTARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET,
TRUNC(PRJ.SUMBASELINEFINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET,
TRUNC(PRJ.STARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET,
TRUNC(PRJ.FINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION,
TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION
FROM P6PROJECT PRJ
WHERE PRJ.ID = :p_project_id
Here we are calculating the percentage of Earned Value and 
storing it into a data element called PRJ_P_EV.
Before we divide by PRJ.SUMPLANNEDLABORUNITS, we check 
PRJ.SUMPLANNEDLABORUNITS to make sure it is not ZERO by 
using the DECODE function.
The DECODE function will compare the 1st argument with the 
2nd argument – and if the 1st and 2nd arguments are equal, the 
3rd argument is returned (which is 0) otherwise the 4th argument 
is returned (which is the result of the division statement) into 
PRJ_P_EV.
BI Publisher – Create DM - Data Set / SQL for Totals/G_1
DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0,
PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV,
-- Get dates for each Monday up to 12 Mondays
( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY,
-- Data Date offset
(CASE
WHEN (TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN
TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )
ELSE
0
END) AS PRJ_DATADATE_OFFSET,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(PRJ.SUMBASELINESTARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET,
TRUNC(PRJ.SUMBASELINEFINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET,
TRUNC(PRJ.STARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET,
TRUNC(PRJ.FINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION,
TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION
FROM P6PROJECT PRJ
WHERE PRJ.ID = :p_project_id
Here we get the FIRST_MONDAY value from the 
results of the WITH clause. 
The WITH clause results are stored in 
DCGLBVALUES (which looks just like a table to 
other SQL statements referencing 
DCGLBVALUES.
In other data sets (such as CHART_DATES), the 
data element FIRST_MONDAY is referenced.
NOTE: The WITH clause may not work with all 
versions of BIP.  In those situations, you need to 
replace DCGLBVALUES with the SELECT 
statement within the WITH clause.
BI Publisher – Create DM - Data Set / SQL for Totals/G_1
( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY,
-- Data Date offset
(CASE
WHEN (TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN
TRUNC(PRJ.DATADATE) -
TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )
ELSE
0
END) AS PRJ_DATADATE_OFFSET,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(PRJ.SUMBASELINESTARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET,
TRUNC(PRJ.SUMBASELINEFINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET,
TRUNC(PRJ.STARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET,
TRUNC(PRJ.FINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION,
TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION
FROM P6PROJECT PRJ
WHERE PRJ.ID = :p_project_id
At one point, we were going to add a vertical bar to the Bar Chart Report using the data date 
however the presentation was becoming too complicated for an hour presentation.
So ‐ we kept the value but did not use it on the Bar Chart Report.
NOTE: When building the bars on the bar chart section of the report, we need offset values 
from the beginning of the graph and durations in numeric format.  We cannot use dates 
directly for the begin and end points on the bars.  Therefore, we use the FIRST_MONDAY as the 
starting point of the chart.
PRJ.DATADATE – FIRST_MONDAY will give us the number of days from the first Monday (which 
is the beginning of the chart).
The CASE statement is similar to an IF‐THEN‐ELSE clause.  If the difference of DATADATE –
FIRST_MONDAY is positive, use it otherwise return 0.
The TRUNC() function is used to drop hours and minutes from the date/time value.
BI Publisher – Create DM - Data Set / SQL for Totals/G_1
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(PRJ.SUMBASELINESTARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES))
AS PRJ_BLSTARTDATE_OFFSET,
TRUNC(PRJ.SUMBASELINEFINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES))
AS PRJ_BLFINISHDATE_OFFSET,
TRUNC(PRJ.STARTDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES))
AS PRJ_STARTDATE_OFFSET,
TRUNC(PRJ.FINISHDATE) -
TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES))
AS PRJ_FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE)
AS PRJ_BLDATE_DURATION,
TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE)
AS PRJ_DATE_DURATION
Here we are calculating the offset and/or durations for the bars on the bar chart using FIRST_MONDAY as the 
starting point of the chart.
NOTE: When building the bars on the bar chart section of the report, we need offset values from the beginning of 
the graph and durations in numeric format.  We cannot use dates directly for the begin and end points on the bars.  
Therefore, we use the FIRST_MONDAY as the starting point of the chart.
Also NOTE: The SQL statement (SELECT FIRST_MONDAY FROM DCGLBVALUES) returns FIRST_MONDAY.
BI Publisher – Create DM - Data Set / SQL for Totals/G_1
That was the end of the SQL for Totals/G_1
Now, we will dissect SQL for IndivdualBars/G_2
BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2
WITH DCINDIVIDUALBARS AS
(
SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE,
SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS,
SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS,
SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS,
SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS,
MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE,
MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE,
MIN(ACT.STARTDATE) AS STARTDATE,
MAX(ACT.FINISHDATE) AS FINISHDATE
FROM P6PROJECT PRJ,
P6ACTIVITY ACT,
P6ACTIVITYCODEASSIGNMENT ACTCODE
WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND
PRJ.OBJECTID = ACT.PROJECTOBJECTID AND
ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND
ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global'
GROUP BY ACTCODE.ACTIVITYCODEVALUE
ORDER BY ACTCODE.ACTIVITYCODEVALUE
)
-- END OF DCINDIVIDUALBARS
-- Offsets from starting date of bar chart
--:FIRST_MONDAY - MIN() AS ACT.BASELINESTARTDATE
SELECT ACTCODEVALUE,
SUM_BLPLANNEDLABORUNITS,
SUM_PLANNEDLABORUNITS,
SUM_EARNEDVALUELABORUNITS,
--
DECODE( SUM_PLANNEDLABORUNITS, 0, 0,
SUM_EARNEDVALUELABORUNITS / SUM_PLANNEDLABORUNITS ) AS
P_EV,
SUM_REMAININGLABORUNITS,
BLSTARTDATE,
BLFINISHDATE,
STARTDATE,
FINISHDATE,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(BLSTARTDATE) - TRUNC(:FIRST_MONDAY) AS BLSTARTDATE_OFFSET,
TRUNC(BLFINISHDATE) - TRUNC(:FIRST_MONDAY) AS BLFINISHDATE_OFFSET,
TRUNC(STARTDATE) - TRUNC(:FIRST_MONDAY) AS STARTDATE_OFFSET,
TRUNC(FINISHDATE) - TRUNC(:FIRST_MONDAY) AS FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(BLFINISHDATE) - TRUNC(BLSTARTDATE) AS BLDATE_DURATION,
TRUNC(FINISHDATE) - TRUNC(STARTDATE) AS DATE_DURATION
FROM DCINDIVIDUALBARS
IndividualBars/G_2 SQL Query
The result from this DS will be 1 record for each 
activity code value for the activity code selected 
when the user runs the report.
In the DS, we use the WITH clause to group and 
sum all activities with the same Activity Code 
Value.  Then we use the results from the WITH 
clause in the SELECT statement.  The primary 
reason for using the WITH clause is to simplify 
the SQL.
The details on following slides 
BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2
WITH DCINDIVIDUALBARS AS
(
SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE,
SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS,
SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS,
SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS,
SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS,
MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE,
MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE,
MIN(ACT.STARTDATE) AS STARTDATE,
MAX(ACT.FINISHDATE) AS FINISHDATE
FROM P6PROJECT PRJ,
P6ACTIVITY ACT,
P6ACTIVITYCODEASSIGNMENT ACTCODE
WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND
PRJ.OBJECTID = ACT.PROJECTOBJECTID AND
ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND
ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global'
GROUP BY ACTCODE.ACTIVITYCODEVALUE
ORDER BY ACTCODE.ACTIVITYCODEVALUE
)
-- END OF DCINDIVIDUALBARS
IndividualBars/G_2 SQL Query
The WITH clause will be covered 
on the next slide
BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2
WITH DCINDIVIDUALBARS AS
(
SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE,
SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS,
SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS,
SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS,
SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS,
MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE,
MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE,
MIN(ACT.STARTDATE) AS STARTDATE,
MAX(ACT.FINISHDATE) AS FINISHDATE
FROM P6PROJECT PRJ,
P6ACTIVITY ACT,
P6ACTIVITYCODEASSIGNMENT ACTCODE
WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND
PRJ.OBJECTID = ACT.PROJECTOBJECTID AND
ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND
ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global'
GROUP BY ACTCODE.ACTIVITYCODEVALUE
ORDER BY ACTCODE.ACTIVITYCODEVALUE
)
-- END OF DCINDIVIDUALBARS
First we link P6PROJECT table with the P6Activity 
table using the parameter :PRJ_OBJECT which 
was initialized in the Totals/G_1 DS.
Next, we link the P6ACTIVITY table with the 
P6ACTIVITYASSIGNMENT table 
Then we tell the SQL to only return 
activities that has been assigned an Activity 
Code (with a scope of GLOBAL) that is 
equal to the one selected when the user 
ran the report.  
BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2
WITH DCINDIVIDUALBARS AS
(
SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE,
SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS,
SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS,
SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS,
SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS,
MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE,
MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE,
MIN(ACT.STARTDATE) AS STARTDATE,
MAX(ACT.FINISHDATE) AS FINISHDATE
FROM P6PROJECT PRJ,
P6ACTIVITY ACT,
P6ACTIVITYCODEASSIGNMENT ACTCODE
WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND
PRJ.OBJECTID = ACT.PROJECTOBJECTID AND
ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND
ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global'
GROUP BY ACTCODE.ACTIVITYCODEVALUE
ORDER BY ACTCODE.ACTIVITYCODEVALUE
)
-- END OF DCINDIVIDUALBARS
Next, we group together the activities with 
the same Activity Code Value (such as ELEC 
for the Activity Code of Team)
The SUM(), MIN(), and MAX() functions 
above key off of the GROUP BY clause.
BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2
WITH DCINDIVIDUALBARS AS
(
SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE,
SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS,
SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS,
SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS,
SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS,
MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE,
MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE,
MIN(ACT.STARTDATE) AS STARTDATE,
MAX(ACT.FINISHDATE) AS FINISHDATE
FROM P6PROJECT PRJ,
P6ACTIVITY ACT,
P6ACTIVITYCODEASSIGNMENT ACTCODE
WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND
PRJ.OBJECTID = ACT.PROJECTOBJECTID AND
ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND
ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global'
GROUP BY ACTCODE.ACTIVITYCODEVALUE
ORDER BY ACTCODE.ACTIVITYCODEVALUE
)
-- END OF DCINDIVIDUALBARS
For all activities with the same Activity Code 
Value (such as ELEC for the Activity Code of 
Team), the following data elements are 
summed:
1. BASELINEPLANNEDLABORUNITS,
2. PLANNEDLABORUNITS,
3. EARNEDVALUELABORUNITS, and
4. REMAININGLABORUNITS
BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2
WITH DCINDIVIDUALBARS AS
(
SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE,
SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS,
SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS,
SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS,
SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS,
MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE,
MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE,
MIN(ACT.STARTDATE) AS STARTDATE,
MAX(ACT.FINISHDATE) AS FINISHDATE
FROM P6PROJECT PRJ,
P6ACTIVITY ACT,
P6ACTIVITYCODEASSIGNMENT ACTCODE
WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND
PRJ.OBJECTID = ACT.PROJECTOBJECTID AND
ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND
ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global'
GROUP BY ACTCODE.ACTIVITYCODEVALUE
ORDER BY ACTCODE.ACTIVITYCODEVALUE
)
-- END OF DCINDIVIDUALBARS
In addition, for all activities with the same 
Activity Code Value (such as ELEC for the 
Activity Code of Team), the earliest start dates 
and the latest finish dates are determined by 
using the MIN() and MAX() functions
BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2
WITH DCINDIVIDUALBARS AS
(
SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE,
SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS,
SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS,
SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS,
SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS,
MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE,
MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE,
MIN(ACT.STARTDATE) AS STARTDATE,
MAX(ACT.FINISHDATE) AS FINISHDATE
FROM P6PROJECT PRJ,
P6ACTIVITY ACT,
P6ACTIVITYCODEASSIGNMENT ACTCODE
WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND
PRJ.OBJECTID = ACT.PROJECTOBJECTID AND
ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND
ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global'
GROUP BY ACTCODE.ACTIVITYCODEVALUE
ORDER BY ACTCODE.ACTIVITYCODEVALUE
)
-- END OF DCINDIVIDUALBARS
-- Offsets from starting date of bar chart
--:FIRST_MONDAY - MIN() AS ACT.BASELINESTARTDATE
SELECT ACTCODEVALUE,
SUM_BLPLANNEDLABORUNITS,
SUM_PLANNEDLABORUNITS,
SUM_EARNEDVALUELABORUNITS,
--
DECODE( SUM_PLANNEDLABORUNITS, 0, 0,
SUM_EARNEDVALUELABORUNITS / SUM_PLANNEDLABORUNITS ) AS
P_EV,
SUM_REMAININGLABORUNITS,
BLSTARTDATE,
BLFINISHDATE,
STARTDATE,
FINISHDATE,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(BLSTARTDATE) - TRUNC(:FIRST_MONDAY) AS BLSTARTDATE_OFFSET,
TRUNC(BLFINISHDATE) - TRUNC(:FIRST_MONDAY) AS BLFINISHDATE_OFFSET,
TRUNC(STARTDATE) - TRUNC(:FIRST_MONDAY) AS STARTDATE_OFFSET,
TRUNC(FINISHDATE) - TRUNC(:FIRST_MONDAY) AS FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(BLFINISHDATE) - TRUNC(BLSTARTDATE) AS BLDATE_DURATION,
TRUNC(FINISHDATE) - TRUNC(STARTDATE) AS DATE_DURATION
FROM DCINDIVIDUALBARS
IndividualBars/G_2 SQL Query
Now, we will dissect the second 
section of the SQL
The details on following slides 
BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2
-- Offsets from starting date of bar chart
--:FIRST_MONDAY - MIN() AS ACT.BASELINESTARTDATE
SELECT ACTCODEVALUE,
SUM_BLPLANNEDLABORUNITS,
SUM_PLANNEDLABORUNITS,
SUM_EARNEDVALUELABORUNITS,
--
DECODE( SUM_PLANNEDLABORUNITS, 0, 0,
SUM_EARNEDVALUELABORUNITS / SUM_PLANNEDLABORUNITS ) AS P_EV,
SUM_REMAININGLABORUNITS,
BLSTARTDATE,
BLFINISHDATE,
STARTDATE,
FINISHDATE,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(BLSTARTDATE) - TRUNC(:FIRST_MONDAY) AS BLSTARTDATE_OFFSET,
TRUNC(BLFINISHDATE) - TRUNC(:FIRST_MONDAY) AS BLFINISHDATE_OFFSET,
TRUNC(STARTDATE) - TRUNC(:FIRST_MONDAY) AS STARTDATE_OFFSET,
TRUNC(FINISHDATE) - TRUNC(:FIRST_MONDAY) AS FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(BLFINISHDATE) - TRUNC(BLSTARTDATE) AS BLDATE_DURATION,
TRUNC(FINISHDATE) - TRUNC(STARTDATE) AS DATE_DURATION
FROM DCINDIVIDUALBARS
IndividualBars/G_2 SQL Query
The SELECT statement uses the results from 
DCINDIVIDUALSBARS (the WITH clause)
See next slide for details
BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2
SELECT ACTCODEVALUE,
SUM_BLPLANNEDLABORUNITS,
SUM_PLANNEDLABORUNITS,
SUM_EARNEDVALUELABORUNITS,
DECODE( SUM_PLANNEDLABORUNITS, 0, 0,
SUM_EARNEDVALUELABORUNITS / SUM_PLANNEDLABORUNITS ) AS P_EV,
SUM_REMAININGLABORUNITS,
BLSTARTDATE,
BLFINISHDATE,
STARTDATE,
FINISHDATE,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(BLSTARTDATE) - TRUNC(:FIRST_MONDAY) AS BLSTARTDATE_OFFSET,
TRUNC(BLFINISHDATE) - TRUNC(:FIRST_MONDAY) AS BLFINISHDATE_OFFSET,
TRUNC(STARTDATE) - TRUNC(:FIRST_MONDAY) AS STARTDATE_OFFSET,
TRUNC(FINISHDATE) - TRUNC(:FIRST_MONDAY) AS FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(BLFINISHDATE) - TRUNC(BLSTARTDATE) AS BLDATE_DURATION,
TRUNC(FINISHDATE) - TRUNC(STARTDATE) AS DATE_DURATION
FROM DCINDIVIDUALBARS
These values come directly from 
DCINDIVIDUALBARS
This is the percentage of Earned Value for all 
activities for a specific Activity Code Value.
This value will be used to create the RED bar 
on the chart.
BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2
SELECT ACTCODEVALUE,
SUM_BLPLANNEDLABORUNITS,
SUM_PLANNEDLABORUNITS,
SUM_EARNEDVALUELABORUNITS,
--
DECODE( SUM_PLANNEDLABORUNITS, 0, 0,
SUM_EARNEDVALUELABORUNITS / SUM_PLANNEDLABORUNITS ) AS P_EV,
SUM_REMAININGLABORUNITS,
BLSTARTDATE,
BLFINISHDATE,
STARTDATE,
FINISHDATE,
-- Now, determine offsets from First Monday for each
-- Date
TRUNC(BLSTARTDATE) - TRUNC(:FIRST_MONDAY) AS BLSTARTDATE_OFFSET,
TRUNC(BLFINISHDATE) - TRUNC(:FIRST_MONDAY) AS BLFINISHDATE_OFFSET,
TRUNC(STARTDATE) - TRUNC(:FIRST_MONDAY) AS STARTDATE_OFFSET,
TRUNC(FINISHDATE) - TRUNC(:FIRST_MONDAY) AS FINISHDATE_OFFSET,
-- Now, determine durations for BL dates and Start/Finish dates
TRUNC(BLFINISHDATE) - TRUNC(BLSTARTDATE) AS BLDATE_DURATION,
TRUNC(FINISHDATE) - TRUNC(STARTDATE) AS DATE_DURATION
FROM DCINDIVIDUALBARS
These values come directly from 
DCINDIVIDUALBARS
Here we are calculating the offset 
and/or durations for the bars on the 
bar chart using FIRST_MONDAY as the 
starting point of the chart.
BI Publisher – Create DM – Data Set / SQL for IndivdualBars/G_2
Totals/G_1 Data Set is “Group Link’ed” to the 
IndividualBars/G_2 Data Set.
So, for every record in G_1, the SQL in G_2 is executed
To add a “Group Link”, click on the Action button then 
select “Create Group Link”
BI Publisher – Create DM - Data Set / SQL for ChartDates/G_3
SELECT TRUNC(:FIRST_MONDAY) AS CHART_DATE1,
TRUNC(:FIRST_MONDAY)+7 AS CHART_DATE2,
TRUNC(:FIRST_MONDAY)+14 AS CHART_DATE3,
TRUNC(:FIRST_MONDAY)+21 AS CHART_DATE4,
TRUNC(:FIRST_MONDAY)+28 AS CHART_DATE5,
TRUNC(:FIRST_MONDAY)+35 AS CHART_DATE6,
TRUNC(:FIRST_MONDAY)+42 AS CHART_DATE7,
TRUNC(:FIRST_MONDAY)+49 AS CHART_DATE8,
TRUNC(:FIRST_MONDAY)+56 AS CHART_DATE9,
TRUNC(:FIRST_MONDAY)+63 AS CHART_DATE10,
TRUNC(:FIRST_MONDAY)+70 AS CHART_DATE11,
TRUNC(:FIRST_MONDAY)+77 AS CHART_DATE12,
TRUNC(:FIRST_MONDAY)+84 AS CHART_DATE13,
TRUNC(:FIRST_MONDAY)+91 AS CHART_DATE14
FROM DUAL
ChartDates/G_3 SQL Query
The result from this DS will 
be 1 record with 14 
columns/data elements.  
Each column is a date 
starting with the first 
Monday prior to the start of 
the project.  Each date is a 
Monday.
These data elements are 
used above the bar chart
BI Publisher – Create DM – Data Set / SQL for ChartDates/G_3
Totals/G_1 Data Set is “Group Link’ed” to the ChartDates/G_3 Data Set.
So, for every record in G_1, the SQL in G_3 is executed
BI Publisher – Create DM - Data Set / SQL for ActivitySpreadData/G_4
SELECT SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) AS ACTS_BLPLANNEDLABORUNITS,
-- DECODE - if :SUM_BLPLANNEDLABORUNITS = 0, return 0 otherwise
-- use :SUM_BLPLANNEDLABORUNITS as divisor
DECODE(:SUM_BLPLANNEDLABORUNITS,0,0,
SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0))/:SUM_BLPLANNEDLABORUNITS )
AS ACTS_P_BLPLANNEDLABORUNITS
FROM P6ACTIVITYSPREAD ACTS,
P6ACTIVITYCODEASSIGNMENT ACTA,
P6ACTIVITY ACT
WHERE ACTS.PROJECTOBJECTID = :PRJ_OBJECTID AND
-- (+) is left join so I can get the data date from act
(ACTS.ACTIVITYOBJECTID = ACT.OBJECTID (+)) AND
TRUNC(ACTS.STARTDATE) <= TRUNC(ACT.DATADATE) AND
ACTS.ACTIVITYOBJECTID = ACTA.ACTIVITYOBJECTID AND
ACTA.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTA.ACTIVITYCODETYPESCOPE = 'AS_Global' AND
ACTA.ACTIVITYCODEVALUE = :ACTCODEVALUE
ActivitySpreadData/G_4 SQL Query
This DS is executed from IndividualBars/G_2 for each Activity Code Value (via a Group Link).
This DS uses a few parameters from other data sets (for example :SUM_BLPLANNEDLABORUNITS and 
:ACTCODEVALUE are initialized in IndividualBars/G_2).
This DS sums the total number of baseline planned labor units up to the Data Date for a specific activity code 
value.   This DS also calculates the percentage of the baseline planned labor units up to the Data Date.
(More comments on next slide)
BI Publisher – Create DM - Data Set / SQL for ActivitySpreadData/G_4
SELECT SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) AS ACTS_BLPLANNEDLABORUNITS,
-- DECODE - if :SUM_BLPLANNEDLABORUNITS = 0, return 0 otherwise
-- use :SUM_BLPLANNEDLABORUNITS as divisor
DECODE(:SUM_BLPLANNEDLABORUNITS,0,0,
SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0))/:SUM_BLPLANNEDLABORUNITS )
AS ACTS_P_BLPLANNEDLABORUNITS
FROM P6ACTIVITYSPREAD ACTS,
P6ACTIVITYCODEASSIGNMENT ACTA,
P6ACTIVITY ACT
WHERE ACTS.PROJECTOBJECTID = :PRJ_OBJECTID AND
-- (+) is left join so I can get the data date from act
(ACTS.ACTIVITYOBJECTID = ACT.OBJECTID (+)) AND
TRUNC(ACTS.STARTDATE) <= TRUNC(ACT.DATADATE) AND
ACTS.ACTIVITYOBJECTID = ACTA.ACTIVITYOBJECTID AND
ACTA.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTA.ACTIVITYCODETYPESCOPE = 'AS_Global' AND
ACTA.ACTIVITYCODEVALUE = :ACTCODEVALUE
ActivitySpreadData/G_4 SQL Query
The purpose of this DS is to determine how many planned labor units should have been done by the Data 
Date.
At one point, we were going to use the results from this DS on the Bar Chart report however the 
presentation was becoming too complicated for an hour presentation.  BUT these results could be added by 
you.
BI Publisher – Create DM - Data Set / SQL for ActivitySpreadData/G_4
SELECT SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) AS ACTS_BLPLANNEDLABORUNITS,
-- DECODE - if :SUM_BLPLANNEDLABORUNITS = 0, return 0 otherwise
-- use :SUM_BLPLANNEDLABORUNITS as divisor
DECODE(:SUM_BLPLANNEDLABORUNITS,0,0,
SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0))
/:SUM_BLPLANNEDLABORUNITS )
AS ACTS_P_BLPLANNEDLABORUNITS
FROM P6ACTIVITYSPREAD ACTS,
P6ACTIVITYCODEASSIGNMENT ACTA,
P6ACTIVITY ACT
WHERE ACTS.PROJECTOBJECTID = :PRJ_OBJECTID AND
-- (+) is left join so I can get the data date from act
(ACTS.ACTIVITYOBJECTID = ACT.OBJECTID (+)) AND
TRUNC(ACTS.STARTDATE) <= TRUNC(ACT.DATADATE) AND
ACTS.ACTIVITYOBJECTID = ACTA.ACTIVITYOBJECTID AND
ACTA.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTA.ACTIVITYCODETYPESCOPE = 'AS_Global' AND
ACTA.ACTIVITYCODEVALUE = :ACTCODEVALUE
This is a LEFT JOIN using (+) from 
the P6ActivityCodeAssignment 
table to the P6Activity table so that 
the Data Date can be determined.
BI Publisher – Create DM - Data Set / SQL for ActivitySpreadData/G_4
SELECT SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) AS ACTS_BLPLANNEDLABORUNITS,
-- DECODE - if :SUM_BLPLANNEDLABORUNITS = 0, return 0 otherwise
-- use :SUM_BLPLANNEDLABORUNITS as divisor
DECODE(:SUM_BLPLANNEDLABORUNITS,0,0,
SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0))
/:SUM_BLPLANNEDLABORUNITS )
AS ACTS_P_BLPLANNEDLABORUNITS
FROM P6ACTIVITYSPREAD ACTS,
P6ACTIVITYCODEASSIGNMENT ACTA,
P6ACTIVITY ACT
WHERE ACTS.PROJECTOBJECTID = :PRJ_OBJECTID AND
-- (+) is left join so I can get the data date from act
(ACTS.ACTIVITYOBJECTID = ACT.OBJECTID (+)) AND
TRUNC(ACTS.STARTDATE) <= TRUNC(ACT.DATADATE) AND
ACTS.ACTIVITYOBJECTID = ACTA.ACTIVITYOBJECTID AND
ACTA.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTA.ACTIVITYCODETYPESCOPE = 'AS_Global' AND
ACTA.ACTIVITYCODEVALUE = :ACTCODEVALUE
Here, we only include spread data 
where the start date is less than or 
equal to the data date
BI Publisher – Create DM - Data Set / SQL for ActivitySpreadData/G_4
SELECT SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) AS ACTS_BLPLANNEDLABORUNITS,
-- DECODE - if :SUM_BLPLANNEDLABORUNITS = 0, return 0 otherwise
-- use :SUM_BLPLANNEDLABORUNITS as divisor
DECODE(:SUM_BLPLANNEDLABORUNITS,0,0,
SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0))
/:SUM_BLPLANNEDLABORUNITS )
AS ACTS_P_BLPLANNEDLABORUNITS
FROM P6ACTIVITYSPREAD ACTS,
P6ACTIVITYCODEASSIGNMENT ACTA,
P6ACTIVITY ACT
WHERE ACTS.PROJECTOBJECTID = :PRJ_OBJECTID AND
-- (+) is left join so I can get the data date from act
(ACTS.ACTIVITYOBJECTID = ACT.OBJECTID (+)) AND
TRUNC(ACTS.STARTDATE) <= TRUNC(ACT.DATADATE) AND
ACTS.ACTIVITYOBJECTID = ACTA.ACTIVITYOBJECTID AND
ACTA.ACTIVITYCODETYPENAME = :p_activitycodetype AND
ACTA.ACTIVITYCODETYPESCOPE = 'AS_Global' AND
ACTA.ACTIVITYCODEVALUE = :ACTCODEVALUE
Here, we only include spread data where the records 
have the right Activity Code Value.
Note: :p_activitycodetype is a parameter that the user 
selected and :ACTCODEVALUE is initialized by the DS 
that executes this DS
BI Publisher – Create DM – Data Set / SQL for ActivitySpreadData/G_4
IndividualBars/G_2 Data Set is “Group Link’ed” to 
the ActivitySpreadData/G_4 Data Set.
So, for every record in G_2, the SQL in G_4 is 
executed
BI Publisher – Create DM – Data Set / SQL for ActivitySpreadData/G_4
To include the data elements from G_4 in 
G_2, we need to drag and drop the data 
elements from G_4 to the 
“Drop here for aggregate function” section. 
Then set the properties on the new data 
elements.
See next slide
BI Publisher – Create DM – Data Set / SQL for ActivitySpreadData/G_4
Select and drag the data element from 
G_4 to the 
“Drop here for aggregate function” 
section. 
After the drag and drop, set 
the properties on the data 
element
BI Publisher – Create DM – Create XML Data
• After creating the LOV’s, Parameters, and the Data Set – you must generate XML
data.
• To create the presentation part of the report, you must have XML data
• You must save the XML data to the DM if you are building the report in the Report
Layout Editor
• You must save the XML data to a file and import it into your WORD document if
you are using the Word Template Builder
BI Publisher – Create DM – Create XML Data
Here are the four data sets described 
on the previous slides
Generate XML Data
Click this button to 
show the screen 
when we can 
generate the XML.
Here are the list of values and parameters 
described on the previous slides
BI Publisher – Create DM – Create XML Data
1. Generate XML 
Data
Select 1 project and 
select 1 Activity 
Code, then click 
“Run”
2. XML Data
The XML data 
has the tag 
names and 
values.
3. Save XML
Either “Export XML” to a 
file or “Save As Sample 
Data” to the DM.
For our example, we need 
to “Export XML” into a file 
so that we can import it 
into the WORD Template 
Builder
BI Publisher – Create DM – Create XML Data
• Save the DM
• Next, build presentation part of report by first creating a report called “Bar Chart”
and then
• Use Word Template Builder for layout
BI Publisher – Create Report
BI Publisher – Create Report – Select DM
Select DM for the 
report then enter a 
name for the report
Then save report.  We 
will call it Barchart
BI Publisher – Create Report
Report Layout Editor
If we were going to create the presentation 
part in the Report Layout Editor tool, then I 
would have selected a Template.  However, 
we will be developing the presentation part 
in the “Word Template Builder” therefore we 
just want to save the report at this time. 
BIP – Create Report – Word Template Builder
• Switch to MS WORD
• Select BI Publisher Add-in tab
• Log into BIP
• Load XML file (that we created from the Data Model)
• Create the report’s layout in WORD (general steps)
• Add Table for the Report Header
• Add Table for the holding area for data for each Activity Code Value
• Save WORD file as RTF
• Upload Template to BIP Report
BIP – Create Report – Word Template Builder
Log On
Enter Username
Enter Password
Enter IP of BIP server
BIP –Template Builder – Select Report
Select Report
Layout Templates
If Barchart was a new report, there 
would not have been any templates 
but in our example, we already 
uploaded a template to this BIP report
BIP –Template Builder – Load XML Data
Select XML File
This file was created by 
the DM
BIP –Template Builder – Create Layout – Add Tables
1. Add Tables
To start, I will add 2 tables 
using WORD’s standard 
features
And I’ll add some 
formatting to the bottom 
table
BIP –Template Builder – Create Layout – Add Tables
I put a grey background on the title 
row then I shifted the column 
widths so that I can display 6 
columns of data and 1 larger column 
for the bars
This will be my report header
The hash marks are actually an image that I built using 
WORD’s graphics features.  The image was inserted in 
the title row.
We could not find an easy method to automatically 
generate the hash marks, but with time we probably 
would have found a solution.
We will be adding data elements from the ChartDates
DS for dates above the hash marks
BIP –Template Builder – Create Layout – Add BIP Repeating Group
1. Move cursor to the 2nd
row, 1st column
We need to add a repeating group that will repeat for each row in IndividualBars/G_2
2.  Click on the BI Publisher tab and click on 
“Repeating Group”  object
BIP –Template Builder – Create Layout – Add BIP Repeating Group
Under Properties tab, select G_2
Under Sort tab, select ACTCODEVALUE
Under Advanced tab, you can see the XLS code that gives the 
power to building reports with the WORD Template Builder.
We will not be changing anything under this object but I 
wanted to bring it to your attention.
BIP –Template Builder – Create Layout – Add BIP Repeating Group
After adding the 
repeating group, a “F” 
and a “E” are added to 
your table 
representing the 
beginning and end of 
the repeating group.
We need to Cut/Paste 
the “E” and move it to 
the right.
Next, we will insert data elements 
from G_2 into the table cells – in 
between the “F” and the “E”
BIP –Template Builder – Create Layout – Add Data Elements to Cells
To add Data Elements to our template, click on the Field object.
Then scroll down to the Data Elements in G_2
Next, select the Data Element (such as 
ActCodeValue) and drag and drop into a cell
BIP –Template Builder – Create Layout – Add Data Elements to Cells
After inserting ActCodeValue, we move the Data Element 
right after the “F” by removing the CR after “F”
Then we will insert additional Data 
Elements and format them
BIP –Template Builder – Create Layout – Add Data Elements to Cells
After inserting Sum_PlannedLaborUnits, select it in the cell and do a right click.
Then select “BI Publisher” then select “Properties”
Continue on next slide
BIP –Template Builder – Create Layout – Add Data Elements to Cells
Change the Type to Number with 
a format of 0 (no decimal 
positions).
After clicking “OK”, notice how the Data Element name is no longer visible
BIP –Template Builder – Create Layout – Add Data Elements to Cells
Insert the following 4 Data Elements into the other 4 cells and format them: 
Sum_EarnedValueLaborUnits, Sum_RemainingLaborUnits, BLStartDate, and BLFinishDate
Next, we need to insert a WORD shape (a black RECTANGLE) with a width equal to the distance 
between the hash marks.
Then we are going to enter instructions behind the shape that tells the shape its starting horizontal 
position and number of times to repeat the shape
BIP –Template Builder - Create Layout – Add Shape for Durations Bar
First move the cursor to position after 
the “E” then click on “Shapes” button.
Then, select and insert a RECTANGLE into 
the cell.
After the Shape is added to the cell, we need to write XSL 
code (behind the RECTANGLE) to control its behavior.
BIP –Template Builder - Create Layout – Add Shape for Durations Bar
Select the RECTANGLE then 
do a right click, then select 
“Format AutoShape”.
Select the “Alt Text” tab.
Under the “Alt Text”, enter 
XSL code to control the 
behavior of the RECTANGLE.
BIP –Template Builder - Create Layout – Add Shape for Durations Bar
The logic is:
For every record in G_2 (for‐each), do the following:
If the DATE_DURATION Data Element in G_2 exists,
Move the shape’s offset to 
(“STARTDATE_OFFSET” * 5.00) + 0.25
using
<?shape‐offset‐x:(STARTDATE_OFFSET*5.00)+0.25?>
Then repeat the shape DATE_DURATION times 
going to the LEFT using
<?shape‐size‐x:(DATE_DURATION);'left'?>
NOTE: You will need to tweak the values (such as 5.00 
and 0.25) and tweak the position of the shape in the 
cell to get it just right.
Also NOTE: For a true test, upload the template to BIP 
and run the report from BIP.
BIP –Template Builder - Create Layout – Add Shape for EV Percentage
Next, we will add another RECTANGLE (this shape 
will be RED).  The RED RECTANGLE will be the same 
width as the BLACK bar but its height will be 
smaller so that the RED bar is within the BLACK bar 
when the report is rendered).
The BLACK bar represents the time duration (in 
days) for the activities with this Activity Code 
Value.
The RED bar will represent the amount of Earned 
Value in % of the BLACK bar.
So – the logic behind the RED bar is similar to the 
logic behind the BLACK bar but the duration is a 
calculation.
See Next Slide
BIP –Template Builder - Create Layout – Add Shape for EV Percentage
For every record in G_2 (for‐each), do the following:
If the DATE_DURATION Data Element in G_2 
exists, move the shape’s offset to 
(“STARTDATE_OFFSET” * 5.00) + 0.0
using
<?shape‐offset‐x:(STARTDATE_OFFSET*5.00)+0.0?>
Then repeat the shape DATE_DURATION times 
going to the LEFT using
<?shape‐size‐x:(DATE_DURATION)*(P_EV);'left'?>
BIP –Template Builder - Create Layout – Duplicate Cells on Total Row
We need to repeat the steps for the total row, 
HOWEVER the total row will use Data Elements 
from G_1 (instead of G_2) – and this includes the 
XSL code behind the shapes on the total row.
Note the group G_1 has the totals from the Data 
Model
Logic for Total Row BLACK bar:
<for‐each@shape:G_1?>
<?if:PRJ_DATE_DURATION?>
<?shape‐offset‐x:(PRJ_STARTDATE_OFFSET*5.00)+0.25?>
<?shape‐size‐x:(PRJ_DATE_DURATION);'left'?>
<?end for‐each?>
Logic for Total Row RED bar:
<for‐each@shape:G_1?>
<?if:PRJ_DATE_DURATION?>
<?shape‐offset‐x:(PRJ_STARTDATE_OFFSET*5.00)+0.00?>
<?shape‐size‐x:(PRJ_DATE_DURATION)*(PRJ_P_EV);'left'?>
<?end for‐each?>
BIP –Template Builder - Create Layout – Add Titles
Now for the finishing touches ….
The top of the report is a table so I’ll layout the cells so that it is organized.
Add the column headers (such as “Activity Value”) to the 2nd table
BIP –Template Builder - Create Layout – Add Titles
BIP – Create Report – Word Template Builder
• To upload Template into BIP
• Save Report File in WORD as a RTF file
• Select “Upload Template As” on BI Publisher Add-in tab
• Save Template to the BIP Report
• Login into BIP
• Open/Edit Report
• Select Template Layout (that we just uploaded from Word Template Builder)
• View Report
• Move Report and DM to P6Reports folder and reattach DM to Report
BIP –Template Builder – Upload Template to BIP Report
BI Publisher – The Bar Chart Report
Wrap Up
To get a copy of the Data Model, the SQL,
the Report, and the RTF file – send me an
email.
See Next Slide for my email
End of Presentation
Questions?
Presented by:
Paul G. Ciszewski, PMP
Dynamic Consulting
PCiszewski@Dynamic-Consulting.net
(920) 883-9048
Please complete the session
evaluation
We appreciate your feedback and insight
You may complete the session evaluation either
on paper or online via the mobile app

More Related Content

What's hot

Oracle BI publisher intro
Oracle BI publisher introOracle BI publisher intro
Oracle BI publisher introAdil Arshad
 
EPM, ERP, Cloud and On-Premise – All options explained - OOW CON9532
EPM, ERP, Cloud and On-Premise – All options explained - OOW CON9532EPM, ERP, Cloud and On-Premise – All options explained - OOW CON9532
EPM, ERP, Cloud and On-Premise – All options explained - OOW CON9532Ray Février
 
Oracle Fusion Architecture
Oracle Fusion ArchitectureOracle Fusion Architecture
Oracle Fusion ArchitectureVinay Kumar
 
Top Seven Steps for Optimizing Cross-Validation Rules in General Ledger
Top Seven Steps for Optimizing Cross-Validation Rules in General LedgerTop Seven Steps for Optimizing Cross-Validation Rules in General Ledger
Top Seven Steps for Optimizing Cross-Validation Rules in General Ledgereprentise
 
Oracle cloud-multi-pillar-implementation-best-practices-wp
Oracle cloud-multi-pillar-implementation-best-practices-wpOracle cloud-multi-pillar-implementation-best-practices-wp
Oracle cloud-multi-pillar-implementation-best-practices-wpRajeshU17
 
Designing a Chart of Accounts and Enterprise Structure in Oracle Fusion ERP C...
Designing a Chart of Accounts and Enterprise Structure in Oracle Fusion ERP C...Designing a Chart of Accounts and Enterprise Structure in Oracle Fusion ERP C...
Designing a Chart of Accounts and Enterprise Structure in Oracle Fusion ERP C...Prithis Das, PMP, OCS ☁️
 
OATUG Forum - Utilizing Groovy and Data Maps for Instantaneous Analysis betw...
OATUG  Forum - Utilizing Groovy and Data Maps for Instantaneous Analysis betw...OATUG  Forum - Utilizing Groovy and Data Maps for Instantaneous Analysis betw...
OATUG Forum - Utilizing Groovy and Data Maps for Instantaneous Analysis betw...Alithya
 
Oracle EPM Cloud for Midsize Customers
Oracle EPM Cloud for Midsize CustomersOracle EPM Cloud for Midsize Customers
Oracle EPM Cloud for Midsize CustomersAlithya
 
Oracle fusion cloud financial : How to create Journal , Manual Vs Spreadsheet?
Oracle fusion cloud financial : How to create Journal , Manual Vs Spreadsheet?Oracle fusion cloud financial : How to create Journal , Manual Vs Spreadsheet?
Oracle fusion cloud financial : How to create Journal , Manual Vs Spreadsheet?Pranav Pandya
 
Case study: Managing a Fusion Financials Cloud Implementation with Oracle Uni...
Case study: Managing a Fusion Financials Cloud Implementation with Oracle Uni...Case study: Managing a Fusion Financials Cloud Implementation with Oracle Uni...
Case study: Managing a Fusion Financials Cloud Implementation with Oracle Uni...Jade Global
 
Hyperion Implementation Questionaries
Hyperion Implementation QuestionariesHyperion Implementation Questionaries
Hyperion Implementation QuestionariesAmit Sharma
 
My Favorite Calc Code
My Favorite Calc CodeMy Favorite Calc Code
My Favorite Calc CodeAlithya
 
Keys to the Kingdom: Key Concepts to ARCS Application Design
Keys to the Kingdom:  Key Concepts to ARCS Application DesignKeys to the Kingdom:  Key Concepts to ARCS Application Design
Keys to the Kingdom: Key Concepts to ARCS Application DesignAlithya
 
Approaches for Changing the Chart of Accounts - Eliminating the Risk
Approaches for Changing the Chart of Accounts - Eliminating the RiskApproaches for Changing the Chart of Accounts - Eliminating the Risk
Approaches for Changing the Chart of Accounts - Eliminating the Riskeprentise
 
How to Generate FSG Reports - Part I
How to Generate FSG Reports - Part IHow to Generate FSG Reports - Part I
How to Generate FSG Reports - Part Ieprentise
 
Finit solutions getting the most out of hfm - intercompany matching and eli...
Finit solutions   getting the most out of hfm - intercompany matching and eli...Finit solutions   getting the most out of hfm - intercompany matching and eli...
Finit solutions getting the most out of hfm - intercompany matching and eli...finitsolutions
 
Application Integration: EPM, ERP, Cloud and On-Premise – All options explained
Application Integration: EPM, ERP, Cloud and On-Premise – All options explainedApplication Integration: EPM, ERP, Cloud and On-Premise – All options explained
Application Integration: EPM, ERP, Cloud and On-Premise – All options explainedAlithya
 

What's hot (20)

Oracle BI publisher intro
Oracle BI publisher introOracle BI publisher intro
Oracle BI publisher intro
 
EPM, ERP, Cloud and On-Premise – All options explained - OOW CON9532
EPM, ERP, Cloud and On-Premise – All options explained - OOW CON9532EPM, ERP, Cloud and On-Premise – All options explained - OOW CON9532
EPM, ERP, Cloud and On-Premise – All options explained - OOW CON9532
 
Record to report (1)
Record to report (1)Record to report (1)
Record to report (1)
 
Oracle Fusion Architecture
Oracle Fusion ArchitectureOracle Fusion Architecture
Oracle Fusion Architecture
 
Top Seven Steps for Optimizing Cross-Validation Rules in General Ledger
Top Seven Steps for Optimizing Cross-Validation Rules in General LedgerTop Seven Steps for Optimizing Cross-Validation Rules in General Ledger
Top Seven Steps for Optimizing Cross-Validation Rules in General Ledger
 
Oracle cloud-multi-pillar-implementation-best-practices-wp
Oracle cloud-multi-pillar-implementation-best-practices-wpOracle cloud-multi-pillar-implementation-best-practices-wp
Oracle cloud-multi-pillar-implementation-best-practices-wp
 
Designing a Chart of Accounts and Enterprise Structure in Oracle Fusion ERP C...
Designing a Chart of Accounts and Enterprise Structure in Oracle Fusion ERP C...Designing a Chart of Accounts and Enterprise Structure in Oracle Fusion ERP C...
Designing a Chart of Accounts and Enterprise Structure in Oracle Fusion ERP C...
 
OATUG Forum - Utilizing Groovy and Data Maps for Instantaneous Analysis betw...
OATUG  Forum - Utilizing Groovy and Data Maps for Instantaneous Analysis betw...OATUG  Forum - Utilizing Groovy and Data Maps for Instantaneous Analysis betw...
OATUG Forum - Utilizing Groovy and Data Maps for Instantaneous Analysis betw...
 
Oracle EPM Cloud for Midsize Customers
Oracle EPM Cloud for Midsize CustomersOracle EPM Cloud for Midsize Customers
Oracle EPM Cloud for Midsize Customers
 
Oracle fusion cloud financial : How to create Journal , Manual Vs Spreadsheet?
Oracle fusion cloud financial : How to create Journal , Manual Vs Spreadsheet?Oracle fusion cloud financial : How to create Journal , Manual Vs Spreadsheet?
Oracle fusion cloud financial : How to create Journal , Manual Vs Spreadsheet?
 
Case study: Managing a Fusion Financials Cloud Implementation with Oracle Uni...
Case study: Managing a Fusion Financials Cloud Implementation with Oracle Uni...Case study: Managing a Fusion Financials Cloud Implementation with Oracle Uni...
Case study: Managing a Fusion Financials Cloud Implementation with Oracle Uni...
 
Hyperion Implementation Questionaries
Hyperion Implementation QuestionariesHyperion Implementation Questionaries
Hyperion Implementation Questionaries
 
My Favorite Calc Code
My Favorite Calc CodeMy Favorite Calc Code
My Favorite Calc Code
 
Keys to the Kingdom: Key Concepts to ARCS Application Design
Keys to the Kingdom:  Key Concepts to ARCS Application DesignKeys to the Kingdom:  Key Concepts to ARCS Application Design
Keys to the Kingdom: Key Concepts to ARCS Application Design
 
Approaches for Changing the Chart of Accounts - Eliminating the Risk
Approaches for Changing the Chart of Accounts - Eliminating the RiskApproaches for Changing the Chart of Accounts - Eliminating the Risk
Approaches for Changing the Chart of Accounts - Eliminating the Risk
 
How to Generate FSG Reports - Part I
How to Generate FSG Reports - Part IHow to Generate FSG Reports - Part I
How to Generate FSG Reports - Part I
 
Finit solutions getting the most out of hfm - intercompany matching and eli...
Finit solutions   getting the most out of hfm - intercompany matching and eli...Finit solutions   getting the most out of hfm - intercompany matching and eli...
Finit solutions getting the most out of hfm - intercompany matching and eli...
 
Application Integration: EPM, ERP, Cloud and On-Premise – All options explained
Application Integration: EPM, ERP, Cloud and On-Premise – All options explainedApplication Integration: EPM, ERP, Cloud and On-Premise – All options explained
Application Integration: EPM, ERP, Cloud and On-Premise – All options explained
 
Oracle FCCS: A Deep Dive
Oracle FCCS: A Deep DiveOracle FCCS: A Deep Dive
Oracle FCCS: A Deep Dive
 
Tables fi co
Tables fi coTables fi co
Tables fi co
 

Viewers also liked

Earthquakes, mountains, volcanoes and valleys
Earthquakes, mountains, volcanoes and valleysEarthquakes, mountains, volcanoes and valleys
Earthquakes, mountains, volcanoes and valleysTeeganisfab
 
The Primavera suite how the tools work together - Oracle Primavera Collabor...
The Primavera suite   how the tools work together - Oracle Primavera Collabor...The Primavera suite   how the tools work together - Oracle Primavera Collabor...
The Primavera suite how the tools work together - Oracle Primavera Collabor...p6academy
 
Master Charts For Presentations
Master Charts For PresentationsMaster Charts For Presentations
Master Charts For Presentationspagemage
 
Primavera EPPM case study - Oracle Primavera P6 Collaborate 14
Primavera EPPM case study - Oracle Primavera P6 Collaborate 14Primavera EPPM case study - Oracle Primavera P6 Collaborate 14
Primavera EPPM case study - Oracle Primavera P6 Collaborate 14p6academy
 
Bi publisher starter guide to develop first report
Bi publisher starter guide to develop first reportBi publisher starter guide to develop first report
Bi publisher starter guide to develop first reportketulp
 
Microsoft Excel Project 1 Presentation
Microsoft Excel Project 1 PresentationMicrosoft Excel Project 1 Presentation
Microsoft Excel Project 1 Presentationjmartinvvc
 
Oracle XML Publisher / BI Publisher
Oracle XML Publisher / BI PublisherOracle XML Publisher / BI Publisher
Oracle XML Publisher / BI PublisherEdi Yanto
 
Describing graphs
Describing graphsDescribing graphs
Describing graphsMeeri Sild
 
P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table R...
P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table R...P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table R...
P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table R...p6academy
 
17 Ways to Design a Presentation People Want to View
17 Ways to Design a Presentation People Want to View17 Ways to Design a Presentation People Want to View
17 Ways to Design a Presentation People Want to ViewJim MacLeod
 

Viewers also liked (12)

Earthquakes, mountains, volcanoes and valleys
Earthquakes, mountains, volcanoes and valleysEarthquakes, mountains, volcanoes and valleys
Earthquakes, mountains, volcanoes and valleys
 
Plate tectonics
Plate tectonicsPlate tectonics
Plate tectonics
 
The Primavera suite how the tools work together - Oracle Primavera Collabor...
The Primavera suite   how the tools work together - Oracle Primavera Collabor...The Primavera suite   how the tools work together - Oracle Primavera Collabor...
The Primavera suite how the tools work together - Oracle Primavera Collabor...
 
Master Charts For Presentations
Master Charts For PresentationsMaster Charts For Presentations
Master Charts For Presentations
 
Primavera EPPM case study - Oracle Primavera P6 Collaborate 14
Primavera EPPM case study - Oracle Primavera P6 Collaborate 14Primavera EPPM case study - Oracle Primavera P6 Collaborate 14
Primavera EPPM case study - Oracle Primavera P6 Collaborate 14
 
Bi publisher starter guide to develop first report
Bi publisher starter guide to develop first reportBi publisher starter guide to develop first report
Bi publisher starter guide to develop first report
 
Microsoft Excel Project 1 Presentation
Microsoft Excel Project 1 PresentationMicrosoft Excel Project 1 Presentation
Microsoft Excel Project 1 Presentation
 
Oracle XML Publisher / BI Publisher
Oracle XML Publisher / BI PublisherOracle XML Publisher / BI Publisher
Oracle XML Publisher / BI Publisher
 
Graphic communication
Graphic communicationGraphic communication
Graphic communication
 
Describing graphs
Describing graphsDescribing graphs
Describing graphs
 
P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table R...
P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table R...P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table R...
P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table R...
 
17 Ways to Design a Presentation People Want to View
17 Ways to Design a Presentation People Want to View17 Ways to Design a Presentation People Want to View
17 Ways to Design a Presentation People Want to View
 

Similar to Create bar chart report for p6 r8.3 using bi publisher 11g - Oracle Primavera P6 Collaborate 14

204460 create s curve reports
204460 create s curve reports204460 create s curve reports
204460 create s curve reportsp6academy
 
]project-open[ Budget Planning and Tracking
]project-open[ Budget Planning and Tracking]project-open[ Budget Planning and Tracking
]project-open[ Budget Planning and TrackingKlaus Hofeditz
 
BI Portfolio
BI PortfolioBI Portfolio
BI Portfoliosprigge
 
Building the BI system and analytics capabilities at the company based on Rea...
Building the BI system and analytics capabilities at the company based on Rea...Building the BI system and analytics capabilities at the company based on Rea...
Building the BI system and analytics capabilities at the company based on Rea...GameCamp
 
Nitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence PortfolioNitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence Portfolionpatel2362
 
Innovate 2014 - Customizing Your Rational Insight Deployment (workshop)
Innovate 2014 - Customizing Your Rational Insight Deployment (workshop)Innovate 2014 - Customizing Your Rational Insight Deployment (workshop)
Innovate 2014 - Customizing Your Rational Insight Deployment (workshop)Marc Nehme
 
Kevin Fahy Bi Portfolio
Kevin Fahy   Bi PortfolioKevin Fahy   Bi Portfolio
Kevin Fahy Bi PortfolioKevinPFahy
 
Business Intelligence Portfolio of Anastasia Bakhareva
Business Intelligence Portfolio of Anastasia BakharevaBusiness Intelligence Portfolio of Anastasia Bakhareva
Business Intelligence Portfolio of Anastasia Bakharevabanastal
 
Primavera - Tutorial
Primavera - TutorialPrimavera - Tutorial
Primavera - TutorialRajeev Sharma
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence PortfolioVito Addotta
 
Rodney Matejek Portfolio
Rodney Matejek PortfolioRodney Matejek Portfolio
Rodney Matejek Portfoliormatejek
 
SSRS - PPS - MOSS Profile
SSRS - PPS - MOSS ProfileSSRS - PPS - MOSS Profile
SSRS - PPS - MOSS Profiletthompson0421
 
Ms project presentation
Ms project presentationMs project presentation
Ms project presentationKhem Singh
 
44259126 ms-project-presentation
44259126 ms-project-presentation44259126 ms-project-presentation
44259126 ms-project-presentationFarrukh Raja
 

Similar to Create bar chart report for p6 r8.3 using bi publisher 11g - Oracle Primavera P6 Collaborate 14 (20)

204460 create s curve reports
204460 create s curve reports204460 create s curve reports
204460 create s curve reports
 
Bi Portfolio
Bi PortfolioBi Portfolio
Bi Portfolio
 
00 project control tools
00 project control tools00 project control tools
00 project control tools
 
]project-open[ Budget Planning and Tracking
]project-open[ Budget Planning and Tracking]project-open[ Budget Planning and Tracking
]project-open[ Budget Planning and Tracking
 
BI Portfolio
BI PortfolioBI Portfolio
BI Portfolio
 
BI Portfolio
BI PortfolioBI Portfolio
BI Portfolio
 
Building the BI system and analytics capabilities at the company based on Rea...
Building the BI system and analytics capabilities at the company based on Rea...Building the BI system and analytics capabilities at the company based on Rea...
Building the BI system and analytics capabilities at the company based on Rea...
 
Nitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence PortfolioNitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence Portfolio
 
Innovate 2014 - Customizing Your Rational Insight Deployment (workshop)
Innovate 2014 - Customizing Your Rational Insight Deployment (workshop)Innovate 2014 - Customizing Your Rational Insight Deployment (workshop)
Innovate 2014 - Customizing Your Rational Insight Deployment (workshop)
 
Kevin Fahy Bi Portfolio
Kevin Fahy   Bi PortfolioKevin Fahy   Bi Portfolio
Kevin Fahy Bi Portfolio
 
Business Intelligence Portfolio of Anastasia Bakhareva
Business Intelligence Portfolio of Anastasia BakharevaBusiness Intelligence Portfolio of Anastasia Bakhareva
Business Intelligence Portfolio of Anastasia Bakhareva
 
Primavera - Tutorial
Primavera - TutorialPrimavera - Tutorial
Primavera - Tutorial
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Rodney Matejek Portfolio
Rodney Matejek PortfolioRodney Matejek Portfolio
Rodney Matejek Portfolio
 
Chaitanya_updated resume
Chaitanya_updated resumeChaitanya_updated resume
Chaitanya_updated resume
 
Chaitanya_updated resume
Chaitanya_updated resumeChaitanya_updated resume
Chaitanya_updated resume
 
SSRS - PPS - MOSS Profile
SSRS - PPS - MOSS ProfileSSRS - PPS - MOSS Profile
SSRS - PPS - MOSS Profile
 
Ms project presentation
Ms project presentationMs project presentation
Ms project presentation
 
44259126 ms-project-presentation
44259126 ms-project-presentation44259126 ms-project-presentation
44259126 ms-project-presentation
 
Course Content.pdf
Course Content.pdfCourse Content.pdf
Course Content.pdf
 

More from p6academy

Oracle OpenWorld 2015
Oracle OpenWorld 2015Oracle OpenWorld 2015
Oracle OpenWorld 2015p6academy
 
Plan and Execute the Right Projects— Easily and Affordably
Plan and Execute the Right Projects—  Easily and AffordablyPlan and Execute the Right Projects—  Easily and Affordably
Plan and Execute the Right Projects— Easily and Affordablyp6academy
 
What's New In Primavera P6 EPPM 17.1
What's New In Primavera P6 EPPM 17.1What's New In Primavera P6 EPPM 17.1
What's New In Primavera P6 EPPM 17.1p6academy
 
Oracle Primavera Unifier What's New in Release 16.2
Oracle Primavera Unifier What's New in Release 16.2Oracle Primavera Unifier What's New in Release 16.2
Oracle Primavera Unifier What's New in Release 16.2p6academy
 
Oracle What's New In Primavera P6 16.2
Oracle What's New In Primavera P6 16.2Oracle What's New In Primavera P6 16.2
Oracle What's New In Primavera P6 16.2p6academy
 
What's New in Primavera Prime 16.1
What's New in Primavera Prime 16.1What's New in Primavera Prime 16.1
What's New in Primavera Prime 16.1p6academy
 
What's New in Primavera Gateway 16.1
What's New in Primavera Gateway 16.1What's New in Primavera Gateway 16.1
What's New in Primavera Gateway 16.1p6academy
 
What's New In Primavera Analytics 16.1
What's New In Primavera Analytics 16.1What's New In Primavera Analytics 16.1
What's New In Primavera Analytics 16.1p6academy
 
What's New in Unifier 16.1
What's New in Unifier 16.1What's New in Unifier 16.1
What's New in Unifier 16.1p6academy
 
20160405 How to Install Primavera P6 16.1 Professional desktop
20160405 How to Install Primavera P6 16.1 Professional desktop20160405 How to Install Primavera P6 16.1 Professional desktop
20160405 How to Install Primavera P6 16.1 Professional desktopp6academy
 
Oracle Primavera P6 16.1 Announced
Oracle Primavera P6 16.1 AnnouncedOracle Primavera P6 16.1 Announced
Oracle Primavera P6 16.1 Announcedp6academy
 
Oracle Primavera Unifier 16.1
Oracle Primavera Unifier 16.1Oracle Primavera Unifier 16.1
Oracle Primavera Unifier 16.1p6academy
 
P6 Release 8 Application Considerations Overview
P6 Release 8 Application Considerations OverviewP6 Release 8 Application Considerations Overview
P6 Release 8 Application Considerations Overviewp6academy
 
Administering Users, Access and Views in P6 EPPM (Web) Release 8 and later
Administering Users, Access and Views in P6 EPPM  (Web) Release 8 and laterAdministering Users, Access and Views in P6 EPPM  (Web) Release 8 and later
Administering Users, Access and Views in P6 EPPM (Web) Release 8 and laterp6academy
 
P6 Release 8 Installation Orientation
P6 Release 8 Installation OrientationP6 Release 8 Installation Orientation
P6 Release 8 Installation Orientationp6academy
 
Oracle Primavera P6 R8 Release Value Proposition
Oracle Primavera P6 R8 Release Value PropositionOracle Primavera P6 R8 Release Value Proposition
Oracle Primavera P6 R8 Release Value Propositionp6academy
 
Oracle Primavera P6 v7 Release Value Proposition
Oracle Primavera P6 v7 Release Value Proposition Oracle Primavera P6 v7 Release Value Proposition
Oracle Primavera P6 v7 Release Value Proposition p6academy
 
Oracle Primavera P6 Release Content Document (RCD)
Oracle Primavera P6 Release Content Document (RCD)Oracle Primavera P6 Release Content Document (RCD)
Oracle Primavera P6 Release Content Document (RCD)p6academy
 
Oracle Support Accreditation – Level 1 Study Guide
Oracle Support Accreditation – Level 1 Study GuideOracle Support Accreditation – Level 1 Study Guide
Oracle Support Accreditation – Level 1 Study Guidep6academy
 
Oracle Primavera Support Accreditation Study Guide
Oracle Primavera Support Accreditation Study GuideOracle Primavera Support Accreditation Study Guide
Oracle Primavera Support Accreditation Study Guidep6academy
 

More from p6academy (20)

Oracle OpenWorld 2015
Oracle OpenWorld 2015Oracle OpenWorld 2015
Oracle OpenWorld 2015
 
Plan and Execute the Right Projects— Easily and Affordably
Plan and Execute the Right Projects—  Easily and AffordablyPlan and Execute the Right Projects—  Easily and Affordably
Plan and Execute the Right Projects— Easily and Affordably
 
What's New In Primavera P6 EPPM 17.1
What's New In Primavera P6 EPPM 17.1What's New In Primavera P6 EPPM 17.1
What's New In Primavera P6 EPPM 17.1
 
Oracle Primavera Unifier What's New in Release 16.2
Oracle Primavera Unifier What's New in Release 16.2Oracle Primavera Unifier What's New in Release 16.2
Oracle Primavera Unifier What's New in Release 16.2
 
Oracle What's New In Primavera P6 16.2
Oracle What's New In Primavera P6 16.2Oracle What's New In Primavera P6 16.2
Oracle What's New In Primavera P6 16.2
 
What's New in Primavera Prime 16.1
What's New in Primavera Prime 16.1What's New in Primavera Prime 16.1
What's New in Primavera Prime 16.1
 
What's New in Primavera Gateway 16.1
What's New in Primavera Gateway 16.1What's New in Primavera Gateway 16.1
What's New in Primavera Gateway 16.1
 
What's New In Primavera Analytics 16.1
What's New In Primavera Analytics 16.1What's New In Primavera Analytics 16.1
What's New In Primavera Analytics 16.1
 
What's New in Unifier 16.1
What's New in Unifier 16.1What's New in Unifier 16.1
What's New in Unifier 16.1
 
20160405 How to Install Primavera P6 16.1 Professional desktop
20160405 How to Install Primavera P6 16.1 Professional desktop20160405 How to Install Primavera P6 16.1 Professional desktop
20160405 How to Install Primavera P6 16.1 Professional desktop
 
Oracle Primavera P6 16.1 Announced
Oracle Primavera P6 16.1 AnnouncedOracle Primavera P6 16.1 Announced
Oracle Primavera P6 16.1 Announced
 
Oracle Primavera Unifier 16.1
Oracle Primavera Unifier 16.1Oracle Primavera Unifier 16.1
Oracle Primavera Unifier 16.1
 
P6 Release 8 Application Considerations Overview
P6 Release 8 Application Considerations OverviewP6 Release 8 Application Considerations Overview
P6 Release 8 Application Considerations Overview
 
Administering Users, Access and Views in P6 EPPM (Web) Release 8 and later
Administering Users, Access and Views in P6 EPPM  (Web) Release 8 and laterAdministering Users, Access and Views in P6 EPPM  (Web) Release 8 and later
Administering Users, Access and Views in P6 EPPM (Web) Release 8 and later
 
P6 Release 8 Installation Orientation
P6 Release 8 Installation OrientationP6 Release 8 Installation Orientation
P6 Release 8 Installation Orientation
 
Oracle Primavera P6 R8 Release Value Proposition
Oracle Primavera P6 R8 Release Value PropositionOracle Primavera P6 R8 Release Value Proposition
Oracle Primavera P6 R8 Release Value Proposition
 
Oracle Primavera P6 v7 Release Value Proposition
Oracle Primavera P6 v7 Release Value Proposition Oracle Primavera P6 v7 Release Value Proposition
Oracle Primavera P6 v7 Release Value Proposition
 
Oracle Primavera P6 Release Content Document (RCD)
Oracle Primavera P6 Release Content Document (RCD)Oracle Primavera P6 Release Content Document (RCD)
Oracle Primavera P6 Release Content Document (RCD)
 
Oracle Support Accreditation – Level 1 Study Guide
Oracle Support Accreditation – Level 1 Study GuideOracle Support Accreditation – Level 1 Study Guide
Oracle Support Accreditation – Level 1 Study Guide
 
Oracle Primavera Support Accreditation Study Guide
Oracle Primavera Support Accreditation Study GuideOracle Primavera Support Accreditation Study Guide
Oracle Primavera Support Accreditation Study Guide
 

Recently uploaded

/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...lizamodels9
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessAggregage
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts ServiceVip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Serviceankitnayak356677
 
Islamabad Escorts | Call 03274100048 | Escort Service in Islamabad
Islamabad Escorts | Call 03274100048 | Escort Service in IslamabadIslamabad Escorts | Call 03274100048 | Escort Service in Islamabad
Islamabad Escorts | Call 03274100048 | Escort Service in IslamabadAyesha Khan
 
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptx
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptxBanana Powder Manufacturing Plant Project Report 2024 Edition.pptx
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptxgeorgebrinton95
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in managementchhavia330
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation SlidesKeppelCorporation
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creationsnakalysalcedo61
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfmuskan1121w
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...lizamodels9
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMRavindra Nath Shukla
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...lizamodels9
 
Catalogue ONG NUOC PPR DE NHAT .pdf
Catalogue ONG NUOC PPR DE NHAT      .pdfCatalogue ONG NUOC PPR DE NHAT      .pdf
Catalogue ONG NUOC PPR DE NHAT .pdfOrient Homes
 
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedLean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedKaiNexus
 
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service DewasVip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewasmakika9823
 
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service PuneVIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service PuneCall girls in Ahmedabad High profile
 
Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni
 

Recently uploaded (20)

/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for Success
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts ServiceVip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
 
Islamabad Escorts | Call 03274100048 | Escort Service in Islamabad
Islamabad Escorts | Call 03274100048 | Escort Service in IslamabadIslamabad Escorts | Call 03274100048 | Escort Service in Islamabad
Islamabad Escorts | Call 03274100048 | Escort Service in Islamabad
 
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptx
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptxBanana Powder Manufacturing Plant Project Report 2024 Edition.pptx
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptx
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in management
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creations
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdf
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
 
Catalogue ONG NUOC PPR DE NHAT .pdf
Catalogue ONG NUOC PPR DE NHAT      .pdfCatalogue ONG NUOC PPR DE NHAT      .pdf
Catalogue ONG NUOC PPR DE NHAT .pdf
 
Best Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting PartnershipBest Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting Partnership
 
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedLean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
 
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service DewasVip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
 
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service PuneVIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
 
Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.
 

Create bar chart report for p6 r8.3 using bi publisher 11g - Oracle Primavera P6 Collaborate 14

  • 1. REMINDER Check in on the COLLABORATE mobile app Create Bar Chart Report for P6R8.x using BI Publisher 11g Prepared by: Paul G. Ciszewski, PMP Dynamic Consulting Session ID#: 15441
  • 2. Overview • Oracle Business Intelligence Publisher (BIP) is a tool to create pixel-perfect reports • To modify existing P6 EPPM Web Reports and to create new P6 EPPM Web Reports, BIP is used • When building your reports, you should use P6’s new Px Extended Scheme (database) • Px Extended Scheme is de-normalized and has P6 calculated values
  • 3. Overview (cont.) Tables in the Px Extended Scheme begin with “P6” • P6Project – list of all projects and related data by project (for ex: the “baseline planned labor units” for project “TA Fall 13”) • P6ProjectSpread - list of all projects and related data by project and date (for ex: the “planned labor units” on November 15, 2013 for project “TA Fall 13”) • P6Activity – list of all activities and related activity data for all projects (for ex: the “earned value labor units” for activity “A1000” for project TA Fall 13) • P6ActivitySpread – list of all activities and related activity data by date for all projects (for ex: the “actual labor units” for activity “A1000” on November 15, 2013 for project TA Fall 13) • P6ActivityCodeAssignment – list of all the activity codes and their values assigned to ALL activities. If an activity has 5 activity codes assigned to it, then there would be 5 records in this table for the one (1) activity • P6ActivityCodeType – list of all activity codes (referred to as Activity Code Types) Note: There are no physical tables called P6Project (or P6Activity). The P6 tables are actually synonyms/aliases that point to “Views”. “Views” are results from executed SQL statements. In the Px Extended Scheme, the “Views” are joins of native P6 tables (such as project, task) and new extended tables (such as projectx and taskx) – and the P6 security tables are included. For our presentation “SYNONYM” is the same as “TABLE”
  • 4. BI Publisher - Introduction • Two (2) main steps to create a BIP report 1. Create Data Model – Using DM Editor to extract data from P6’s Extended Px Scheme (database) 2. Create Report Layout – to present the data. But there are 2 tools to create the presentation part:  Report Layout Editor (web tool which is within BIP)  Word Template Builder (a MS WORD add-on)
  • 5. BI Publisher – Presentation Objective Presentation Objective Go through all the steps to: 1. Develop the Data  Model (SQL) to extract  the data from P6 2. Develop the Bar Chart  Template in the WORD  Template Builder that  uses the Data Model 3. Upload the Template  to the Report in BI  Publisher 4. Move the Report and  Data Model to the  P6Reports folder 5. Run Bar Chart Report  in P6 and produce the  same output as you  see on this slide
  • 6. BI Publisher – Report Details Report Details 1. The user selects a project and  an activity code (such as Team) 2. The Data Model will group and  sum all with the same Activity  Code Value (such as ELEC) 3. Display values (such as Planed  Hours and BL Start Date) based  on group of activities with the  same value (ELEC). 4. Create a bar (the gray bar)  representing the earliest start  date and the latest finish date  for the group of activities with  the same value (ELEC). 5. Create an inner bar (the red  bar) representing the  percentage of Earned Value for  the group of activities with the  same value (ELEC). 6. This report was designed to  handle a 3 month project.  The  hash marks are not  dynamically created
  • 7. BI Publisher - Login • User Name should  exist in P6 • The user’s security is  applied
  • 8. BI Publisher – Home Screen
  • 9. BI Publisher – Create Data Model (DM) Eight (8) components need to be created within the DM for our example 1. Create 2 List of Values (LOV) 2. Create 2 parameters 3. Create 4 Data Sets See next slide for view of completed DM
  • 10. BI Publisher – Create Data Model (DM)
  • 11. BI Publisher – Create New DM Check “Include Empty Tags  for Null Elements” too.   We want all data elements  from the P6 DB even if the  data elements are null
  • 12. BI Publisher – Create New DM – P6 Tables Five (5) P6 Tables needed to create DM 1. P6Project (list of projects and all related data) 2. P6Activity (list of activities and all related data) 3. P6ActivitySpread (list of activities and activity data by date) A data set was included to determine the number of hours that was supposed to be done up the data date (based on the baseline) but the data elements were not used in our report. HOWEVER this extra data could be used to expand the report. 4. P6ActivityCodeAssignments (list of ALL activity codes and their values assigned to EVERY activity) 5. P6ActivityCodeType (list of ALL activity codes defined in your P6 DB)
  • 13. BI Publisher – Create DM – Parameter Desired “look and feel” in P6
  • 14. BI Publisher – Create DM – Parameter Desired “look and feel” in P6 for selecting a project
  • 15. BI Publisher – Create DM – Parameter Desired “look and feel” in P6 for selecting an activity code
  • 16. BI Publisher – Create DM - Parameter First create two (2) list of values (LOV) • 1 for Projects and • 1 for Activity Codes
  • 17. BI Publisher – Create DM – Create LOV’s SQL to retrieve the list of Project ID’s for  projects that are active and that are currently  being published sorted by Project ID
  • 18. BI Publisher – Create DM – Create LOV’s SQL to retrieve the list of Activity Codes with a  scope of Global sorted by Activity Code name
  • 19. BI Publisher – Create DM - Parameter Next, create two (2) parameters • 1 for Projects and • 1 for Activity Codes
  • 20. BI Publisher – Create DM – Create Parameter “p_project_id” is special  parameter recognized by P6 When “Parameter Type” is Menu, a “LOV”  can be selected. For our example, when the user runs the  report, they can only select 1 project
  • 21. BI Publisher – Create DM – Create Parameter “p_activitycodetype is NOT is special  parameter recognized by P6 When “Parameter Type” is Menu, a “LOV” can be selected. For our example, when the user runs the report, they can  only select 1 activity code
  • 22. BI Publisher – Create DM – Data Sets • Next, create the Data Sets • Data Sets contain the SQL query/statements to extract the P6 data (such as the projects data date and an activity’s baseline planned labor units) from the P6 tables • In our example, we will create four (4) data sets which will be joined together • In general, our data sets will sum and group activities using the activity code value assigned to the activity (using the activity code selected)
  • 23. BI Publisher – Create DM – Data Sets 4 Data Sets • Totals Data Set (DS/G_1) – the result will be 1 record containing project level data. In addition, this DS will determine the first Monday prior to the start of the project (for titles on the report and for determining durations for number of bars) • Chart Dates DS (G_3) – the result will be 1 record with 14 columns (14 columns for 14 weeks for the bars). Each column will contain the date for the Monday of that week. • IndividualBars DS (G_2) – the result will be 1 record for each activity code value for the activity code selected. This DS will group and sum activities together by the activity code value. This DS will also determine the earliest start date and the latest finish date for all the activities for 1 activity code value. Continued on next slide
  • 24. BI Publisher – Create DM – Data Sets 4 Data Sets (cont.) • ActivitySpreadData DS (G_4) – the result will be 1 record for each activity code value. This DS will determine how many baseline planned labor units (and %) should have been completed by the data date. The results from this DS are returned to the IndividualBars DS (G_2)
  • 25. BI Publisher – Create DM – Create Data Set Then select “SQL Query”
  • 26. BI Publisher – Create DM – Create Data Set More notes on next slide
  • 27. BI Publisher – Create DM – Create Data Set You could use “Query Builder” for simple SQL  queries/statements.   “Query Builder” builds the SQL query for us. But for advanced/complex SQL  queries/statements, I just type it in myself
  • 28. BI Publisher – Create DM – Create Data Set I typed in the SQL  query/statement
  • 29. BI Publisher – Create DM - Data Set / SQL for Totals/G_1 WITH DCGLBVALUES AS ( -- Get the first Monday before the the earliest start date -- for the project -- BASICALLY, we get the earliest date - then -- substract 7 from that date - then find the Next Monday SELECT TRUNC(NEXT_DAY( TRUNC( (SELECT (CASE WHEN TRUNC(PRJ.SUMBASELINESTARTDATE) < TRUNC(PRJ.STARTDATE) THEN TRUNC(PRJ.SUMBASELINESTARTDATE) ELSE TRUNC(PRJ.STARTDATE) END ) AS EARLIEST_PHASE_DATE FROM P6PROJECT PRJ WHERE PRJ.ID = :p_project_id ) -7 ), 'MONDAY')) AS FIRST_MONDAY FROM DUAL ) -- END OF DCGLBVALUES SELECT PRJ.ID AS PRJ_ID, PRJ.NAME AS PRJ_NAME, PRJ.OBJECTID AS PRJ_OBJECTID, PRJ.DATADATE AS PRJ_DATADATE, PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS, PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS, PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS, PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE, PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE, PRJ.STARTDATE AS PRJ_STARTDATE, PRJ.FINISHDATE AS PRJ_FINISHDATE, PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON, DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0, PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV, -- Get dates for each monday up to 12 mondays ( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY, -- Data Date offset (CASE WHEN (TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) ) ELSE 0 END) AS PRJ_DATADATE_OFFSET, -- Now, determine offsets from First Monday for each -- Date TRUNC(PRJ.SUMBASELINESTARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET, TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET, TRUNC(PRJ.STARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET, TRUNC(PRJ.FINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION, TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION FROM P6PROJECT PRJ WHERE PRJ.ID = :p_project_id Totals/G_1 SQL Query The result from this DS will  be 1 record with the data  elements for the project  selected. Data elements include the  project name, data date, total  planned labor units, etc. This DS also determines the  first Monday for the start of  the project’s start date using  the WITH clause. The details are on following  slides 
  • 30. WITH DCGLBVALUES AS ( -- Get the first Monday before the the earliest start date -- for the project -- BASICALLY, we get the earliest date - then -- substract 7 from that date - then find the Next Monday SELECT TRUNC(NEXT_DAY( TRUNC( (SELECT (CASE WHEN TRUNC(PRJ.SUMBASELINESTARTDATE) < TRUNC(PRJ.STARTDATE) THEN TRUNC(PRJ.SUMBASELINESTARTDATE) ELSE TRUNC(PRJ.STARTDATE) END ) AS EARLIEST_PHASE_DATE FROM P6PROJECT PRJ WHERE PRJ.ID = :p_project_id ) -7 ), 'MONDAY')) AS FIRST_MONDAY FROM DUAL ) -- END OF DCGLBVALUES SELECT PRJ.ID AS PRJ_ID, PRJ.NAME AS PRJ_NAME, PRJ.OBJECTID AS PRJ_OBJECTID, PRJ.DATADATE AS PRJ_DATADATE, PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS, PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS, PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS, PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE, PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE, PRJ.STARTDATE AS PRJ_STARTDATE, PRJ.FINISHDATE AS PRJ_FINISHDATE, PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON, DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0, PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV, -- Get dates for each monday up to 12 mondays ( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY, -- Data Date offset (CASE WHEN (TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) ) ELSE 0 END) AS PRJ_DATADATE_OFFSET, -- Now, determine offsets from First Monday for each -- Date TRUNC(PRJ.SUMBASELINESTARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET, TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET, TRUNC(PRJ.STARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET, TRUNC(PRJ.FINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION, TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION FROM P6PROJECT PRJ WHERE PRJ.ID = :p_project_id BI Publisher – Create DM - Data Set / SQL for Totals/G_1 Totals/G_1 SQL Query WITH clause section will be reviewed on  next slide
  • 31. BI Publisher – Create DM - Data Set / SQL for Totals/G_1 WITH DCGLBVALUES AS ( -- Get the first Monday before the earliest start date -- for the project -- BASICALLY, we get the earliest date - then -- subtract 7 from that date - then find the Next Monday SELECT TRUNC(NEXT_DAY( TRUNC( (SELECT (CASE WHEN TRUNC(PRJ.SUMBASELINESTARTDATE) < TRUNC(PRJ.STARTDATE) THEN TRUNC(PRJ.SUMBASELINESTARTDATE) ELSE TRUNC(PRJ.STARTDATE) END ) AS EARLIEST_PHASE_DATE FROM P6PROJECT PRJ WHERE PRJ.ID = :p_project_id ) -7 ), 'MONDAY')) AS FIRST_MONDAY FROM DUAL ) -- END OF DCGLBVALUES First_Monday The With clause will return the results of the SQL  in DCGLBVALUES. The results of DCGLBVALUES are used in the next  section of the data set
  • 32. BI Publisher – Create DM - Data Set / SQL for Totals/G_1 Totals/G_1 SQL Query The SELECT statement extracts data from  P6Project and DCGLBVALUES. In the next few slides, this SELECT  statement will be dissected.   WITH DCGLBVALUES AS ( -- Get the first Monday before the the earliest start date -- for the project -- BASICALLY, we get the earliest date - then -- substract 7 from that date - then find the Next Monday SELECT TRUNC(NEXT_DAY( TRUNC( (SELECT (CASE WHEN TRUNC(PRJ.SUMBASELINESTARTDATE) < TRUNC(PRJ.STARTDATE) THEN TRUNC(PRJ.SUMBASELINESTARTDATE) ELSE TRUNC(PRJ.STARTDATE) END ) AS EARLIEST_PHASE_DATE FROM P6PROJECT PRJ WHERE PRJ.ID = :p_project_id ) -7 ), 'MONDAY')) AS FIRST_MONDAY FROM DUAL ) -- END OF DCGLBVALUES SELECT PRJ.ID AS PRJ_ID, PRJ.NAME AS PRJ_NAME, PRJ.OBJECTID AS PRJ_OBJECTID, PRJ.DATADATE AS PRJ_DATADATE, PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS, PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS, PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS, PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE, PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE, PRJ.STARTDATE AS PRJ_STARTDATE, PRJ.FINISHDATE AS PRJ_FINISHDATE, PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON, DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0, PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV, -- Get dates for each monday up to 12 mondays ( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY, -- Data Date offset (CASE WHEN (TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) ) ELSE 0 END) AS PRJ_DATADATE_OFFSET, -- Now, determine offsets from First Monday for each -- Date TRUNC(PRJ.SUMBASELINESTARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET, TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET, TRUNC(PRJ.STARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET, TRUNC(PRJ.FINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION, TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION FROM P6PROJECT PRJ WHERE PRJ.ID = :p_project_id
  • 33. BI Publisher – Create DM - Data Set / SQL for Totals/G_1 SELECT PRJ.ID AS PRJ_ID, PRJ.NAME AS PRJ_NAME, PRJ.OBJECTID AS PRJ_OBJECTID, PRJ.DATADATE AS PRJ_DATADATE, PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS, PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS, PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS, PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE, PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE, PRJ.STARTDATE AS PRJ_STARTDATE, PRJ.FINISHDATE AS PRJ_FINISHDATE, PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON, DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0, PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV, -- Get dates for each Monday up to 12 Mondays ( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY, -- Data Date offset (CASE WHEN (TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) ) ELSE 0 END) AS PRJ_DATADATE_OFFSET, -- Now, determine offsets from First Monday for each -- Date TRUNC(PRJ.SUMBASELINESTARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET, TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET, TRUNC(PRJ.STARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET, TRUNC(PRJ.FINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION, TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION FROM P6PROJECT PRJ WHERE PRJ.ID = :p_project_id Read the project’s data from P6Project for only  the project id that was selected. To use the value in a parameter, prefix the  parameter name with “:”
  • 34. BI Publisher – Create DM - Data Set / SQL for Totals/G_1 SELECT PRJ.ID AS PRJ_ID, PRJ.NAME AS PRJ_NAME, PRJ.OBJECTID AS PRJ_OBJECTID, PRJ.DATADATE AS PRJ_DATADATE, PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS, PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS, PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS, PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE, PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE, PRJ.STARTDATE AS PRJ_STARTDATE, PRJ.FINISHDATE AS PRJ_FINISHDATE, PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON, Here we are pulling in standard data elements  from the P6Project table. Some of these data elements (such as Project  Name/PRJ_NAME and Last Published  On/PRJ_LASTPUBLISHEDON) will be used  directly on the report.
  • 35. BI Publisher – Create DM - Data Set / SQL for Totals/G_1 SELECT PRJ.ID AS PRJ_ID, PRJ.NAME AS PRJ_NAME, PRJ.OBJECTID AS PRJ_OBJECTID, PRJ.DATADATE AS PRJ_DATADATE, PRJ.SUMPLANNEDLABORUNITS AS PRJ_PLANNEDLABORUNITS, PRJ.SUMEARNEDVALUEBYLABORUNITS AS PRJ_EARNEDVALUELABORUNITS, PRJ.SUMREMAININGLABORUNITS AS PRJ_REMAININGLABORUNITS, PRJ.SUMBASELINESTARTDATE AS PRJ_BLSTARTDATE, PRJ.SUMBASELINEFINISHDATE AS PRJ_BLFINISHDATE, PRJ.STARTDATE AS PRJ_STARTDATE, PRJ.FINISHDATE AS PRJ_FINISHDATE, PRJ.LASTPUBLISHEDON AS PRJ_LASTPUBLISHEDON, DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0, PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV, -- Get dates for each Monday up to 12 Mondays ( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY, -- Data Date offset (CASE WHEN (TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) ) ELSE 0 END) AS PRJ_DATADATE_OFFSET, -- Now, determine offsets from First Monday for each -- Date TRUNC(PRJ.SUMBASELINESTARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET, TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET, TRUNC(PRJ.STARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET, TRUNC(PRJ.FINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION, TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION FROM P6PROJECT PRJ WHERE PRJ.ID = :p_project_id Here we are calculating the percentage of Earned Value and  storing it into a data element called PRJ_P_EV. Before we divide by PRJ.SUMPLANNEDLABORUNITS, we check  PRJ.SUMPLANNEDLABORUNITS to make sure it is not ZERO by  using the DECODE function. The DECODE function will compare the 1st argument with the  2nd argument – and if the 1st and 2nd arguments are equal, the  3rd argument is returned (which is 0) otherwise the 4th argument  is returned (which is the result of the division statement) into  PRJ_P_EV.
  • 36. BI Publisher – Create DM - Data Set / SQL for Totals/G_1 DECODE( NVL(PRJ.SUMPLANNEDLABORUNITS,0), 0, 0, PRJ.SUMEARNEDVALUEBYLABORUNITS / PRJ.SUMPLANNEDLABORUNITS ) AS PRJ_P_EV, -- Get dates for each Monday up to 12 Mondays ( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY, -- Data Date offset (CASE WHEN (TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) ) ELSE 0 END) AS PRJ_DATADATE_OFFSET, -- Now, determine offsets from First Monday for each -- Date TRUNC(PRJ.SUMBASELINESTARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET, TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET, TRUNC(PRJ.STARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET, TRUNC(PRJ.FINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION, TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION FROM P6PROJECT PRJ WHERE PRJ.ID = :p_project_id Here we get the FIRST_MONDAY value from the  results of the WITH clause.  The WITH clause results are stored in  DCGLBVALUES (which looks just like a table to  other SQL statements referencing  DCGLBVALUES. In other data sets (such as CHART_DATES), the  data element FIRST_MONDAY is referenced. NOTE: The WITH clause may not work with all  versions of BIP.  In those situations, you need to  replace DCGLBVALUES with the SELECT  statement within the WITH clause.
  • 37. BI Publisher – Create DM - Data Set / SQL for Totals/G_1 ( SELECT FIRST_MONDAY FROM DCGLBVALUES) AS FIRST_MONDAY, -- Data Date offset (CASE WHEN (TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) )) >= 0 THEN TRUNC(PRJ.DATADATE) - TRUNC( (SELECT FIRST_MONDAY FROM DCGLBVALUES) ) ELSE 0 END) AS PRJ_DATADATE_OFFSET, -- Now, determine offsets from First Monday for each -- Date TRUNC(PRJ.SUMBASELINESTARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET, TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET, TRUNC(PRJ.STARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET, TRUNC(PRJ.FINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION, TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION FROM P6PROJECT PRJ WHERE PRJ.ID = :p_project_id At one point, we were going to add a vertical bar to the Bar Chart Report using the data date  however the presentation was becoming too complicated for an hour presentation. So ‐ we kept the value but did not use it on the Bar Chart Report. NOTE: When building the bars on the bar chart section of the report, we need offset values  from the beginning of the graph and durations in numeric format.  We cannot use dates  directly for the begin and end points on the bars.  Therefore, we use the FIRST_MONDAY as the  starting point of the chart. PRJ.DATADATE – FIRST_MONDAY will give us the number of days from the first Monday (which  is the beginning of the chart). The CASE statement is similar to an IF‐THEN‐ELSE clause.  If the difference of DATADATE – FIRST_MONDAY is positive, use it otherwise return 0. The TRUNC() function is used to drop hours and minutes from the date/time value.
  • 38. BI Publisher – Create DM - Data Set / SQL for Totals/G_1 -- Now, determine offsets from First Monday for each -- Date TRUNC(PRJ.SUMBASELINESTARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLSTARTDATE_OFFSET, TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_BLFINISHDATE_OFFSET, TRUNC(PRJ.STARTDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_STARTDATE_OFFSET, TRUNC(PRJ.FINISHDATE) - TRUNC((SELECT FIRST_MONDAY FROM DCGLBVALUES)) AS PRJ_FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(PRJ.SUMBASELINEFINISHDATE) - TRUNC(PRJ.SUMBASELINESTARTDATE) AS PRJ_BLDATE_DURATION, TRUNC(PRJ.FINISHDATE) - TRUNC(PRJ.STARTDATE) AS PRJ_DATE_DURATION Here we are calculating the offset and/or durations for the bars on the bar chart using FIRST_MONDAY as the  starting point of the chart. NOTE: When building the bars on the bar chart section of the report, we need offset values from the beginning of  the graph and durations in numeric format.  We cannot use dates directly for the begin and end points on the bars.   Therefore, we use the FIRST_MONDAY as the starting point of the chart. Also NOTE: The SQL statement (SELECT FIRST_MONDAY FROM DCGLBVALUES) returns FIRST_MONDAY.
  • 39. BI Publisher – Create DM - Data Set / SQL for Totals/G_1 That was the end of the SQL for Totals/G_1 Now, we will dissect SQL for IndivdualBars/G_2
  • 40. BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2 WITH DCINDIVIDUALBARS AS ( SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE, SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS, SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS, SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS, SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS, MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE, MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE, MIN(ACT.STARTDATE) AS STARTDATE, MAX(ACT.FINISHDATE) AS FINISHDATE FROM P6PROJECT PRJ, P6ACTIVITY ACT, P6ACTIVITYCODEASSIGNMENT ACTCODE WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND PRJ.OBJECTID = ACT.PROJECTOBJECTID AND ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global' GROUP BY ACTCODE.ACTIVITYCODEVALUE ORDER BY ACTCODE.ACTIVITYCODEVALUE ) -- END OF DCINDIVIDUALBARS -- Offsets from starting date of bar chart --:FIRST_MONDAY - MIN() AS ACT.BASELINESTARTDATE SELECT ACTCODEVALUE, SUM_BLPLANNEDLABORUNITS, SUM_PLANNEDLABORUNITS, SUM_EARNEDVALUELABORUNITS, -- DECODE( SUM_PLANNEDLABORUNITS, 0, 0, SUM_EARNEDVALUELABORUNITS / SUM_PLANNEDLABORUNITS ) AS P_EV, SUM_REMAININGLABORUNITS, BLSTARTDATE, BLFINISHDATE, STARTDATE, FINISHDATE, -- Now, determine offsets from First Monday for each -- Date TRUNC(BLSTARTDATE) - TRUNC(:FIRST_MONDAY) AS BLSTARTDATE_OFFSET, TRUNC(BLFINISHDATE) - TRUNC(:FIRST_MONDAY) AS BLFINISHDATE_OFFSET, TRUNC(STARTDATE) - TRUNC(:FIRST_MONDAY) AS STARTDATE_OFFSET, TRUNC(FINISHDATE) - TRUNC(:FIRST_MONDAY) AS FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(BLFINISHDATE) - TRUNC(BLSTARTDATE) AS BLDATE_DURATION, TRUNC(FINISHDATE) - TRUNC(STARTDATE) AS DATE_DURATION FROM DCINDIVIDUALBARS IndividualBars/G_2 SQL Query The result from this DS will be 1 record for each  activity code value for the activity code selected  when the user runs the report. In the DS, we use the WITH clause to group and  sum all activities with the same Activity Code  Value.  Then we use the results from the WITH  clause in the SELECT statement.  The primary  reason for using the WITH clause is to simplify  the SQL. The details on following slides 
  • 41. BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2 WITH DCINDIVIDUALBARS AS ( SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE, SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS, SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS, SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS, SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS, MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE, MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE, MIN(ACT.STARTDATE) AS STARTDATE, MAX(ACT.FINISHDATE) AS FINISHDATE FROM P6PROJECT PRJ, P6ACTIVITY ACT, P6ACTIVITYCODEASSIGNMENT ACTCODE WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND PRJ.OBJECTID = ACT.PROJECTOBJECTID AND ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global' GROUP BY ACTCODE.ACTIVITYCODEVALUE ORDER BY ACTCODE.ACTIVITYCODEVALUE ) -- END OF DCINDIVIDUALBARS IndividualBars/G_2 SQL Query The WITH clause will be covered  on the next slide
  • 42. BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2 WITH DCINDIVIDUALBARS AS ( SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE, SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS, SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS, SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS, SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS, MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE, MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE, MIN(ACT.STARTDATE) AS STARTDATE, MAX(ACT.FINISHDATE) AS FINISHDATE FROM P6PROJECT PRJ, P6ACTIVITY ACT, P6ACTIVITYCODEASSIGNMENT ACTCODE WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND PRJ.OBJECTID = ACT.PROJECTOBJECTID AND ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global' GROUP BY ACTCODE.ACTIVITYCODEVALUE ORDER BY ACTCODE.ACTIVITYCODEVALUE ) -- END OF DCINDIVIDUALBARS First we link P6PROJECT table with the P6Activity  table using the parameter :PRJ_OBJECT which  was initialized in the Totals/G_1 DS. Next, we link the P6ACTIVITY table with the  P6ACTIVITYASSIGNMENT table  Then we tell the SQL to only return  activities that has been assigned an Activity  Code (with a scope of GLOBAL) that is  equal to the one selected when the user  ran the report.  
  • 43. BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2 WITH DCINDIVIDUALBARS AS ( SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE, SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS, SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS, SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS, SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS, MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE, MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE, MIN(ACT.STARTDATE) AS STARTDATE, MAX(ACT.FINISHDATE) AS FINISHDATE FROM P6PROJECT PRJ, P6ACTIVITY ACT, P6ACTIVITYCODEASSIGNMENT ACTCODE WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND PRJ.OBJECTID = ACT.PROJECTOBJECTID AND ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global' GROUP BY ACTCODE.ACTIVITYCODEVALUE ORDER BY ACTCODE.ACTIVITYCODEVALUE ) -- END OF DCINDIVIDUALBARS Next, we group together the activities with  the same Activity Code Value (such as ELEC  for the Activity Code of Team) The SUM(), MIN(), and MAX() functions  above key off of the GROUP BY clause.
  • 44. BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2 WITH DCINDIVIDUALBARS AS ( SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE, SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS, SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS, SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS, SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS, MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE, MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE, MIN(ACT.STARTDATE) AS STARTDATE, MAX(ACT.FINISHDATE) AS FINISHDATE FROM P6PROJECT PRJ, P6ACTIVITY ACT, P6ACTIVITYCODEASSIGNMENT ACTCODE WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND PRJ.OBJECTID = ACT.PROJECTOBJECTID AND ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global' GROUP BY ACTCODE.ACTIVITYCODEVALUE ORDER BY ACTCODE.ACTIVITYCODEVALUE ) -- END OF DCINDIVIDUALBARS For all activities with the same Activity Code  Value (such as ELEC for the Activity Code of  Team), the following data elements are  summed: 1. BASELINEPLANNEDLABORUNITS, 2. PLANNEDLABORUNITS, 3. EARNEDVALUELABORUNITS, and 4. REMAININGLABORUNITS
  • 45. BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2 WITH DCINDIVIDUALBARS AS ( SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE, SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS, SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS, SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS, SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS, MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE, MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE, MIN(ACT.STARTDATE) AS STARTDATE, MAX(ACT.FINISHDATE) AS FINISHDATE FROM P6PROJECT PRJ, P6ACTIVITY ACT, P6ACTIVITYCODEASSIGNMENT ACTCODE WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND PRJ.OBJECTID = ACT.PROJECTOBJECTID AND ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global' GROUP BY ACTCODE.ACTIVITYCODEVALUE ORDER BY ACTCODE.ACTIVITYCODEVALUE ) -- END OF DCINDIVIDUALBARS In addition, for all activities with the same  Activity Code Value (such as ELEC for the  Activity Code of Team), the earliest start dates  and the latest finish dates are determined by  using the MIN() and MAX() functions
  • 46. BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2 WITH DCINDIVIDUALBARS AS ( SELECT ACTCODE.ACTIVITYCODEVALUE AS ACTCODEVALUE, SUM(NVL(ACT.BASELINEPLANNEDLABORUNITS,0)) AS SUM_BLPLANNEDLABORUNITS, SUM(NVL(ACT.PLANNEDLABORUNITS,0)) AS SUM_PLANNEDLABORUNITS, SUM(NVL(ACT.EARNEDVALUELABORUNITS,0)) AS SUM_EARNEDVALUELABORUNITS, SUM(NVL(ACT.REMAININGLABORUNITS,0)) AS SUM_REMAININGLABORUNITS, MIN(ACT.BASELINESTARTDATE) AS BLSTARTDATE, MAX(ACT.BASELINEFINISHDATE) AS BLFINISHDATE, MIN(ACT.STARTDATE) AS STARTDATE, MAX(ACT.FINISHDATE) AS FINISHDATE FROM P6PROJECT PRJ, P6ACTIVITY ACT, P6ACTIVITYCODEASSIGNMENT ACTCODE WHERE PRJ.OBJECTID = :PRJ_OBJECTID AND PRJ.OBJECTID = ACT.PROJECTOBJECTID AND ACT.OBJECTID = ACTCODE.ACTIVITYOBJECTID AND ACTCODE.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTCODE.ACTIVITYCODETYPESCOPE = 'AS_Global' GROUP BY ACTCODE.ACTIVITYCODEVALUE ORDER BY ACTCODE.ACTIVITYCODEVALUE ) -- END OF DCINDIVIDUALBARS -- Offsets from starting date of bar chart --:FIRST_MONDAY - MIN() AS ACT.BASELINESTARTDATE SELECT ACTCODEVALUE, SUM_BLPLANNEDLABORUNITS, SUM_PLANNEDLABORUNITS, SUM_EARNEDVALUELABORUNITS, -- DECODE( SUM_PLANNEDLABORUNITS, 0, 0, SUM_EARNEDVALUELABORUNITS / SUM_PLANNEDLABORUNITS ) AS P_EV, SUM_REMAININGLABORUNITS, BLSTARTDATE, BLFINISHDATE, STARTDATE, FINISHDATE, -- Now, determine offsets from First Monday for each -- Date TRUNC(BLSTARTDATE) - TRUNC(:FIRST_MONDAY) AS BLSTARTDATE_OFFSET, TRUNC(BLFINISHDATE) - TRUNC(:FIRST_MONDAY) AS BLFINISHDATE_OFFSET, TRUNC(STARTDATE) - TRUNC(:FIRST_MONDAY) AS STARTDATE_OFFSET, TRUNC(FINISHDATE) - TRUNC(:FIRST_MONDAY) AS FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(BLFINISHDATE) - TRUNC(BLSTARTDATE) AS BLDATE_DURATION, TRUNC(FINISHDATE) - TRUNC(STARTDATE) AS DATE_DURATION FROM DCINDIVIDUALBARS IndividualBars/G_2 SQL Query Now, we will dissect the second  section of the SQL The details on following slides 
  • 47. BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2 -- Offsets from starting date of bar chart --:FIRST_MONDAY - MIN() AS ACT.BASELINESTARTDATE SELECT ACTCODEVALUE, SUM_BLPLANNEDLABORUNITS, SUM_PLANNEDLABORUNITS, SUM_EARNEDVALUELABORUNITS, -- DECODE( SUM_PLANNEDLABORUNITS, 0, 0, SUM_EARNEDVALUELABORUNITS / SUM_PLANNEDLABORUNITS ) AS P_EV, SUM_REMAININGLABORUNITS, BLSTARTDATE, BLFINISHDATE, STARTDATE, FINISHDATE, -- Now, determine offsets from First Monday for each -- Date TRUNC(BLSTARTDATE) - TRUNC(:FIRST_MONDAY) AS BLSTARTDATE_OFFSET, TRUNC(BLFINISHDATE) - TRUNC(:FIRST_MONDAY) AS BLFINISHDATE_OFFSET, TRUNC(STARTDATE) - TRUNC(:FIRST_MONDAY) AS STARTDATE_OFFSET, TRUNC(FINISHDATE) - TRUNC(:FIRST_MONDAY) AS FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(BLFINISHDATE) - TRUNC(BLSTARTDATE) AS BLDATE_DURATION, TRUNC(FINISHDATE) - TRUNC(STARTDATE) AS DATE_DURATION FROM DCINDIVIDUALBARS IndividualBars/G_2 SQL Query The SELECT statement uses the results from  DCINDIVIDUALSBARS (the WITH clause) See next slide for details
  • 48. BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2 SELECT ACTCODEVALUE, SUM_BLPLANNEDLABORUNITS, SUM_PLANNEDLABORUNITS, SUM_EARNEDVALUELABORUNITS, DECODE( SUM_PLANNEDLABORUNITS, 0, 0, SUM_EARNEDVALUELABORUNITS / SUM_PLANNEDLABORUNITS ) AS P_EV, SUM_REMAININGLABORUNITS, BLSTARTDATE, BLFINISHDATE, STARTDATE, FINISHDATE, -- Now, determine offsets from First Monday for each -- Date TRUNC(BLSTARTDATE) - TRUNC(:FIRST_MONDAY) AS BLSTARTDATE_OFFSET, TRUNC(BLFINISHDATE) - TRUNC(:FIRST_MONDAY) AS BLFINISHDATE_OFFSET, TRUNC(STARTDATE) - TRUNC(:FIRST_MONDAY) AS STARTDATE_OFFSET, TRUNC(FINISHDATE) - TRUNC(:FIRST_MONDAY) AS FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(BLFINISHDATE) - TRUNC(BLSTARTDATE) AS BLDATE_DURATION, TRUNC(FINISHDATE) - TRUNC(STARTDATE) AS DATE_DURATION FROM DCINDIVIDUALBARS These values come directly from  DCINDIVIDUALBARS This is the percentage of Earned Value for all  activities for a specific Activity Code Value. This value will be used to create the RED bar  on the chart.
  • 49. BI Publisher – Create DM - Data Set / SQL for IndivdualBars/G_2 SELECT ACTCODEVALUE, SUM_BLPLANNEDLABORUNITS, SUM_PLANNEDLABORUNITS, SUM_EARNEDVALUELABORUNITS, -- DECODE( SUM_PLANNEDLABORUNITS, 0, 0, SUM_EARNEDVALUELABORUNITS / SUM_PLANNEDLABORUNITS ) AS P_EV, SUM_REMAININGLABORUNITS, BLSTARTDATE, BLFINISHDATE, STARTDATE, FINISHDATE, -- Now, determine offsets from First Monday for each -- Date TRUNC(BLSTARTDATE) - TRUNC(:FIRST_MONDAY) AS BLSTARTDATE_OFFSET, TRUNC(BLFINISHDATE) - TRUNC(:FIRST_MONDAY) AS BLFINISHDATE_OFFSET, TRUNC(STARTDATE) - TRUNC(:FIRST_MONDAY) AS STARTDATE_OFFSET, TRUNC(FINISHDATE) - TRUNC(:FIRST_MONDAY) AS FINISHDATE_OFFSET, -- Now, determine durations for BL dates and Start/Finish dates TRUNC(BLFINISHDATE) - TRUNC(BLSTARTDATE) AS BLDATE_DURATION, TRUNC(FINISHDATE) - TRUNC(STARTDATE) AS DATE_DURATION FROM DCINDIVIDUALBARS These values come directly from  DCINDIVIDUALBARS Here we are calculating the offset  and/or durations for the bars on the  bar chart using FIRST_MONDAY as the  starting point of the chart.
  • 50. BI Publisher – Create DM – Data Set / SQL for IndivdualBars/G_2 Totals/G_1 Data Set is “Group Link’ed” to the  IndividualBars/G_2 Data Set. So, for every record in G_1, the SQL in G_2 is executed To add a “Group Link”, click on the Action button then  select “Create Group Link”
  • 51. BI Publisher – Create DM - Data Set / SQL for ChartDates/G_3 SELECT TRUNC(:FIRST_MONDAY) AS CHART_DATE1, TRUNC(:FIRST_MONDAY)+7 AS CHART_DATE2, TRUNC(:FIRST_MONDAY)+14 AS CHART_DATE3, TRUNC(:FIRST_MONDAY)+21 AS CHART_DATE4, TRUNC(:FIRST_MONDAY)+28 AS CHART_DATE5, TRUNC(:FIRST_MONDAY)+35 AS CHART_DATE6, TRUNC(:FIRST_MONDAY)+42 AS CHART_DATE7, TRUNC(:FIRST_MONDAY)+49 AS CHART_DATE8, TRUNC(:FIRST_MONDAY)+56 AS CHART_DATE9, TRUNC(:FIRST_MONDAY)+63 AS CHART_DATE10, TRUNC(:FIRST_MONDAY)+70 AS CHART_DATE11, TRUNC(:FIRST_MONDAY)+77 AS CHART_DATE12, TRUNC(:FIRST_MONDAY)+84 AS CHART_DATE13, TRUNC(:FIRST_MONDAY)+91 AS CHART_DATE14 FROM DUAL ChartDates/G_3 SQL Query The result from this DS will  be 1 record with 14  columns/data elements.   Each column is a date  starting with the first  Monday prior to the start of  the project.  Each date is a  Monday. These data elements are  used above the bar chart
  • 52. BI Publisher – Create DM – Data Set / SQL for ChartDates/G_3 Totals/G_1 Data Set is “Group Link’ed” to the ChartDates/G_3 Data Set. So, for every record in G_1, the SQL in G_3 is executed
  • 53. BI Publisher – Create DM - Data Set / SQL for ActivitySpreadData/G_4 SELECT SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) AS ACTS_BLPLANNEDLABORUNITS, -- DECODE - if :SUM_BLPLANNEDLABORUNITS = 0, return 0 otherwise -- use :SUM_BLPLANNEDLABORUNITS as divisor DECODE(:SUM_BLPLANNEDLABORUNITS,0,0, SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0))/:SUM_BLPLANNEDLABORUNITS ) AS ACTS_P_BLPLANNEDLABORUNITS FROM P6ACTIVITYSPREAD ACTS, P6ACTIVITYCODEASSIGNMENT ACTA, P6ACTIVITY ACT WHERE ACTS.PROJECTOBJECTID = :PRJ_OBJECTID AND -- (+) is left join so I can get the data date from act (ACTS.ACTIVITYOBJECTID = ACT.OBJECTID (+)) AND TRUNC(ACTS.STARTDATE) <= TRUNC(ACT.DATADATE) AND ACTS.ACTIVITYOBJECTID = ACTA.ACTIVITYOBJECTID AND ACTA.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTA.ACTIVITYCODETYPESCOPE = 'AS_Global' AND ACTA.ACTIVITYCODEVALUE = :ACTCODEVALUE ActivitySpreadData/G_4 SQL Query This DS is executed from IndividualBars/G_2 for each Activity Code Value (via a Group Link). This DS uses a few parameters from other data sets (for example :SUM_BLPLANNEDLABORUNITS and  :ACTCODEVALUE are initialized in IndividualBars/G_2). This DS sums the total number of baseline planned labor units up to the Data Date for a specific activity code  value.   This DS also calculates the percentage of the baseline planned labor units up to the Data Date. (More comments on next slide)
  • 54. BI Publisher – Create DM - Data Set / SQL for ActivitySpreadData/G_4 SELECT SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) AS ACTS_BLPLANNEDLABORUNITS, -- DECODE - if :SUM_BLPLANNEDLABORUNITS = 0, return 0 otherwise -- use :SUM_BLPLANNEDLABORUNITS as divisor DECODE(:SUM_BLPLANNEDLABORUNITS,0,0, SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0))/:SUM_BLPLANNEDLABORUNITS ) AS ACTS_P_BLPLANNEDLABORUNITS FROM P6ACTIVITYSPREAD ACTS, P6ACTIVITYCODEASSIGNMENT ACTA, P6ACTIVITY ACT WHERE ACTS.PROJECTOBJECTID = :PRJ_OBJECTID AND -- (+) is left join so I can get the data date from act (ACTS.ACTIVITYOBJECTID = ACT.OBJECTID (+)) AND TRUNC(ACTS.STARTDATE) <= TRUNC(ACT.DATADATE) AND ACTS.ACTIVITYOBJECTID = ACTA.ACTIVITYOBJECTID AND ACTA.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTA.ACTIVITYCODETYPESCOPE = 'AS_Global' AND ACTA.ACTIVITYCODEVALUE = :ACTCODEVALUE ActivitySpreadData/G_4 SQL Query The purpose of this DS is to determine how many planned labor units should have been done by the Data  Date. At one point, we were going to use the results from this DS on the Bar Chart report however the  presentation was becoming too complicated for an hour presentation.  BUT these results could be added by  you.
  • 55. BI Publisher – Create DM - Data Set / SQL for ActivitySpreadData/G_4 SELECT SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) AS ACTS_BLPLANNEDLABORUNITS, -- DECODE - if :SUM_BLPLANNEDLABORUNITS = 0, return 0 otherwise -- use :SUM_BLPLANNEDLABORUNITS as divisor DECODE(:SUM_BLPLANNEDLABORUNITS,0,0, SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) /:SUM_BLPLANNEDLABORUNITS ) AS ACTS_P_BLPLANNEDLABORUNITS FROM P6ACTIVITYSPREAD ACTS, P6ACTIVITYCODEASSIGNMENT ACTA, P6ACTIVITY ACT WHERE ACTS.PROJECTOBJECTID = :PRJ_OBJECTID AND -- (+) is left join so I can get the data date from act (ACTS.ACTIVITYOBJECTID = ACT.OBJECTID (+)) AND TRUNC(ACTS.STARTDATE) <= TRUNC(ACT.DATADATE) AND ACTS.ACTIVITYOBJECTID = ACTA.ACTIVITYOBJECTID AND ACTA.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTA.ACTIVITYCODETYPESCOPE = 'AS_Global' AND ACTA.ACTIVITYCODEVALUE = :ACTCODEVALUE This is a LEFT JOIN using (+) from  the P6ActivityCodeAssignment  table to the P6Activity table so that  the Data Date can be determined.
  • 56. BI Publisher – Create DM - Data Set / SQL for ActivitySpreadData/G_4 SELECT SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) AS ACTS_BLPLANNEDLABORUNITS, -- DECODE - if :SUM_BLPLANNEDLABORUNITS = 0, return 0 otherwise -- use :SUM_BLPLANNEDLABORUNITS as divisor DECODE(:SUM_BLPLANNEDLABORUNITS,0,0, SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) /:SUM_BLPLANNEDLABORUNITS ) AS ACTS_P_BLPLANNEDLABORUNITS FROM P6ACTIVITYSPREAD ACTS, P6ACTIVITYCODEASSIGNMENT ACTA, P6ACTIVITY ACT WHERE ACTS.PROJECTOBJECTID = :PRJ_OBJECTID AND -- (+) is left join so I can get the data date from act (ACTS.ACTIVITYOBJECTID = ACT.OBJECTID (+)) AND TRUNC(ACTS.STARTDATE) <= TRUNC(ACT.DATADATE) AND ACTS.ACTIVITYOBJECTID = ACTA.ACTIVITYOBJECTID AND ACTA.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTA.ACTIVITYCODETYPESCOPE = 'AS_Global' AND ACTA.ACTIVITYCODEVALUE = :ACTCODEVALUE Here, we only include spread data  where the start date is less than or  equal to the data date
  • 57. BI Publisher – Create DM - Data Set / SQL for ActivitySpreadData/G_4 SELECT SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) AS ACTS_BLPLANNEDLABORUNITS, -- DECODE - if :SUM_BLPLANNEDLABORUNITS = 0, return 0 otherwise -- use :SUM_BLPLANNEDLABORUNITS as divisor DECODE(:SUM_BLPLANNEDLABORUNITS,0,0, SUM(NVL(ACTS.BASELINEPLANNEDLABORUNITS,0)) /:SUM_BLPLANNEDLABORUNITS ) AS ACTS_P_BLPLANNEDLABORUNITS FROM P6ACTIVITYSPREAD ACTS, P6ACTIVITYCODEASSIGNMENT ACTA, P6ACTIVITY ACT WHERE ACTS.PROJECTOBJECTID = :PRJ_OBJECTID AND -- (+) is left join so I can get the data date from act (ACTS.ACTIVITYOBJECTID = ACT.OBJECTID (+)) AND TRUNC(ACTS.STARTDATE) <= TRUNC(ACT.DATADATE) AND ACTS.ACTIVITYOBJECTID = ACTA.ACTIVITYOBJECTID AND ACTA.ACTIVITYCODETYPENAME = :p_activitycodetype AND ACTA.ACTIVITYCODETYPESCOPE = 'AS_Global' AND ACTA.ACTIVITYCODEVALUE = :ACTCODEVALUE Here, we only include spread data where the records  have the right Activity Code Value. Note: :p_activitycodetype is a parameter that the user  selected and :ACTCODEVALUE is initialized by the DS  that executes this DS
  • 58. BI Publisher – Create DM – Data Set / SQL for ActivitySpreadData/G_4 IndividualBars/G_2 Data Set is “Group Link’ed” to  the ActivitySpreadData/G_4 Data Set. So, for every record in G_2, the SQL in G_4 is  executed
  • 59. BI Publisher – Create DM – Data Set / SQL for ActivitySpreadData/G_4 To include the data elements from G_4 in  G_2, we need to drag and drop the data  elements from G_4 to the  “Drop here for aggregate function” section.  Then set the properties on the new data  elements. See next slide
  • 60. BI Publisher – Create DM – Data Set / SQL for ActivitySpreadData/G_4 Select and drag the data element from  G_4 to the  “Drop here for aggregate function”  section.  After the drag and drop, set  the properties on the data  element
  • 61. BI Publisher – Create DM – Create XML Data • After creating the LOV’s, Parameters, and the Data Set – you must generate XML data. • To create the presentation part of the report, you must have XML data • You must save the XML data to the DM if you are building the report in the Report Layout Editor • You must save the XML data to a file and import it into your WORD document if you are using the Word Template Builder
  • 62. BI Publisher – Create DM – Create XML Data Here are the four data sets described  on the previous slides Generate XML Data Click this button to  show the screen  when we can  generate the XML. Here are the list of values and parameters  described on the previous slides
  • 63. BI Publisher – Create DM – Create XML Data 1. Generate XML  Data Select 1 project and  select 1 Activity  Code, then click  “Run” 2. XML Data The XML data  has the tag  names and  values. 3. Save XML Either “Export XML” to a  file or “Save As Sample  Data” to the DM. For our example, we need  to “Export XML” into a file  so that we can import it  into the WORD Template  Builder
  • 64. BI Publisher – Create DM – Create XML Data • Save the DM • Next, build presentation part of report by first creating a report called “Bar Chart” and then • Use Word Template Builder for layout
  • 65. BI Publisher – Create Report
  • 66. BI Publisher – Create Report – Select DM Select DM for the  report then enter a  name for the report Then save report.  We  will call it Barchart
  • 67. BI Publisher – Create Report Report Layout Editor If we were going to create the presentation  part in the Report Layout Editor tool, then I  would have selected a Template.  However,  we will be developing the presentation part  in the “Word Template Builder” therefore we  just want to save the report at this time. 
  • 68. BIP – Create Report – Word Template Builder • Switch to MS WORD • Select BI Publisher Add-in tab • Log into BIP • Load XML file (that we created from the Data Model) • Create the report’s layout in WORD (general steps) • Add Table for the Report Header • Add Table for the holding area for data for each Activity Code Value • Save WORD file as RTF • Upload Template to BIP Report
  • 69. BIP – Create Report – Word Template Builder Log On Enter Username Enter Password Enter IP of BIP server
  • 70. BIP –Template Builder – Select Report Select Report Layout Templates If Barchart was a new report, there  would not have been any templates  but in our example, we already  uploaded a template to this BIP report
  • 71. BIP –Template Builder – Load XML Data Select XML File This file was created by  the DM
  • 72. BIP –Template Builder – Create Layout – Add Tables 1. Add Tables To start, I will add 2 tables  using WORD’s standard  features And I’ll add some  formatting to the bottom  table
  • 73. BIP –Template Builder – Create Layout – Add Tables I put a grey background on the title  row then I shifted the column  widths so that I can display 6  columns of data and 1 larger column  for the bars This will be my report header The hash marks are actually an image that I built using  WORD’s graphics features.  The image was inserted in  the title row. We could not find an easy method to automatically  generate the hash marks, but with time we probably  would have found a solution. We will be adding data elements from the ChartDates DS for dates above the hash marks
  • 74. BIP –Template Builder – Create Layout – Add BIP Repeating Group 1. Move cursor to the 2nd row, 1st column We need to add a repeating group that will repeat for each row in IndividualBars/G_2 2.  Click on the BI Publisher tab and click on  “Repeating Group”  object
  • 75. BIP –Template Builder – Create Layout – Add BIP Repeating Group Under Properties tab, select G_2 Under Sort tab, select ACTCODEVALUE Under Advanced tab, you can see the XLS code that gives the  power to building reports with the WORD Template Builder. We will not be changing anything under this object but I  wanted to bring it to your attention.
  • 76. BIP –Template Builder – Create Layout – Add BIP Repeating Group After adding the  repeating group, a “F”  and a “E” are added to  your table  representing the  beginning and end of  the repeating group. We need to Cut/Paste  the “E” and move it to  the right. Next, we will insert data elements  from G_2 into the table cells – in  between the “F” and the “E”
  • 77. BIP –Template Builder – Create Layout – Add Data Elements to Cells To add Data Elements to our template, click on the Field object. Then scroll down to the Data Elements in G_2 Next, select the Data Element (such as  ActCodeValue) and drag and drop into a cell
  • 78. BIP –Template Builder – Create Layout – Add Data Elements to Cells After inserting ActCodeValue, we move the Data Element  right after the “F” by removing the CR after “F” Then we will insert additional Data  Elements and format them
  • 79. BIP –Template Builder – Create Layout – Add Data Elements to Cells After inserting Sum_PlannedLaborUnits, select it in the cell and do a right click. Then select “BI Publisher” then select “Properties” Continue on next slide
  • 80. BIP –Template Builder – Create Layout – Add Data Elements to Cells Change the Type to Number with  a format of 0 (no decimal  positions). After clicking “OK”, notice how the Data Element name is no longer visible
  • 81. BIP –Template Builder – Create Layout – Add Data Elements to Cells Insert the following 4 Data Elements into the other 4 cells and format them:  Sum_EarnedValueLaborUnits, Sum_RemainingLaborUnits, BLStartDate, and BLFinishDate Next, we need to insert a WORD shape (a black RECTANGLE) with a width equal to the distance  between the hash marks. Then we are going to enter instructions behind the shape that tells the shape its starting horizontal  position and number of times to repeat the shape
  • 82. BIP –Template Builder - Create Layout – Add Shape for Durations Bar First move the cursor to position after  the “E” then click on “Shapes” button. Then, select and insert a RECTANGLE into  the cell. After the Shape is added to the cell, we need to write XSL  code (behind the RECTANGLE) to control its behavior.
  • 83. BIP –Template Builder - Create Layout – Add Shape for Durations Bar Select the RECTANGLE then  do a right click, then select  “Format AutoShape”. Select the “Alt Text” tab. Under the “Alt Text”, enter  XSL code to control the  behavior of the RECTANGLE.
  • 84. BIP –Template Builder - Create Layout – Add Shape for Durations Bar The logic is: For every record in G_2 (for‐each), do the following: If the DATE_DURATION Data Element in G_2 exists, Move the shape’s offset to  (“STARTDATE_OFFSET” * 5.00) + 0.25 using <?shape‐offset‐x:(STARTDATE_OFFSET*5.00)+0.25?> Then repeat the shape DATE_DURATION times  going to the LEFT using <?shape‐size‐x:(DATE_DURATION);'left'?> NOTE: You will need to tweak the values (such as 5.00  and 0.25) and tweak the position of the shape in the  cell to get it just right. Also NOTE: For a true test, upload the template to BIP  and run the report from BIP.
  • 85. BIP –Template Builder - Create Layout – Add Shape for EV Percentage Next, we will add another RECTANGLE (this shape  will be RED).  The RED RECTANGLE will be the same  width as the BLACK bar but its height will be  smaller so that the RED bar is within the BLACK bar  when the report is rendered). The BLACK bar represents the time duration (in  days) for the activities with this Activity Code  Value. The RED bar will represent the amount of Earned  Value in % of the BLACK bar. So – the logic behind the RED bar is similar to the  logic behind the BLACK bar but the duration is a  calculation. See Next Slide
  • 86. BIP –Template Builder - Create Layout – Add Shape for EV Percentage For every record in G_2 (for‐each), do the following: If the DATE_DURATION Data Element in G_2  exists, move the shape’s offset to  (“STARTDATE_OFFSET” * 5.00) + 0.0 using <?shape‐offset‐x:(STARTDATE_OFFSET*5.00)+0.0?> Then repeat the shape DATE_DURATION times  going to the LEFT using <?shape‐size‐x:(DATE_DURATION)*(P_EV);'left'?>
  • 87. BIP –Template Builder - Create Layout – Duplicate Cells on Total Row We need to repeat the steps for the total row,  HOWEVER the total row will use Data Elements  from G_1 (instead of G_2) – and this includes the  XSL code behind the shapes on the total row. Note the group G_1 has the totals from the Data  Model Logic for Total Row BLACK bar: <for‐each@shape:G_1?> <?if:PRJ_DATE_DURATION?> <?shape‐offset‐x:(PRJ_STARTDATE_OFFSET*5.00)+0.25?> <?shape‐size‐x:(PRJ_DATE_DURATION);'left'?> <?end for‐each?> Logic for Total Row RED bar: <for‐each@shape:G_1?> <?if:PRJ_DATE_DURATION?> <?shape‐offset‐x:(PRJ_STARTDATE_OFFSET*5.00)+0.00?> <?shape‐size‐x:(PRJ_DATE_DURATION)*(PRJ_P_EV);'left'?> <?end for‐each?>
  • 88. BIP –Template Builder - Create Layout – Add Titles Now for the finishing touches …. The top of the report is a table so I’ll layout the cells so that it is organized. Add the column headers (such as “Activity Value”) to the 2nd table
  • 89. BIP –Template Builder - Create Layout – Add Titles
  • 90. BIP – Create Report – Word Template Builder • To upload Template into BIP • Save Report File in WORD as a RTF file • Select “Upload Template As” on BI Publisher Add-in tab • Save Template to the BIP Report • Login into BIP • Open/Edit Report • Select Template Layout (that we just uploaded from Word Template Builder) • View Report • Move Report and DM to P6Reports folder and reattach DM to Report
  • 91. BIP –Template Builder – Upload Template to BIP Report
  • 92. BI Publisher – The Bar Chart Report
  • 93. Wrap Up To get a copy of the Data Model, the SQL, the Report, and the RTF file – send me an email. See Next Slide for my email
  • 94. End of Presentation Questions? Presented by: Paul G. Ciszewski, PMP Dynamic Consulting PCiszewski@Dynamic-Consulting.net (920) 883-9048
  • 95. Please complete the session evaluation We appreciate your feedback and insight You may complete the session evaluation either on paper or online via the mobile app