This example is to understand how to create and use Analytic Grid and Analytic Engine which is available in PeopleTools.
This is a simple example to create Read Only Analytic Grid without any PeopleCode used.
This can be more complex if Analytic Grid is used as Read/Write. (I will not cover Read/Write Analytic Grid in this example).
Example: To Create Analytic Grid for Location based Department based Head Count from Job record.
Preview:
Below Steps are used to create Analytic Grid for above example:
Note: Analytic Grid can be based on Physical Record or View. However if view is used then the Analytic Grid will be read-only. For read-write analytic grid physical record is required with the version record. As this example is to demonstrate only read-only I am using view for this example. |
Step 1: Create a view over Job record or Job effective date view with LOCATION, DEPTID, PM_COUNT fields. This is used for Analytic Grid Data Cube Collection
a) Create a view and insert the fields to the record LOCATION, DEPTID, PM_COUNT. PM_COUNT is a number field and LOCATION and DEPTID as Primary Key.
b) Save the view as “PM_HEADCOUNT_VW”
c) Provide the below SQL in the view.
SELECT LOCATION
, DEPTID
, COUNT(*) AS PM_COUNT
FROM PS_PM_JOB_VW
GROUP BY LOCATION
,DEPTID
Step 2: Create a work record which is used for Analytic Grid Presentation Cube Collection.
a) Create a work record with LOCATION, DEPTID, PM_COUNT fields.
b) Save the work record as “PM_HDCOUNT_WRK”
Step 3: Creating Analytic Model.
a) Create New Analytic Model from Application designer.
b) Right click on the “Dimension” and create two dimensions as LOCATION and DEPTID as shown in the image.
c) Save the Analytic Model as “PM_HEADCOUNT_AM”
d) Right Click on the Cubes and Create “HEADCOUNT” cube and attach “LOCATION” and “DEPTID” dimensions to the cube as shown below.
e) Right Click on the Cube collection and create “DATACUBECOLLECTION” cube collection and associate “HEADCOUNT” cube to the Cube Collection and assign the created view “PM_HEADCOUNT_VW” in “Main Record” section of General Tab as shown below.
f) Map the appropriate fields in “Field Map” Tab as shown.
g) Right Click on the Cube collection and create “PRESENTATIONCUBECOLLECTION” cube collection as above and associate “HEADCOUNT” cube to the Cube Collection and assign the created work record “PM_HDCOUNT_WRK” in “Main Record” section of General Tab as done for “DATACUBECOLLECTION”. Map the appropriate fields in the “Field Map” Tab.
h) Create “Explicit Dimension Set” to filter value based on Location or Department. To Create “Explicit Dimension Set” Click on “Explicit Dimension Set” shown in above example and right click to add “Add Dimension Set”. Add the dimension set as shown in the below Image.
i) Save the Analytic Model.
Step 4: Creating Analytic Type.
a) Create new Analytic Type from application designer and associate the Analytic Model (PM_HEADCOUNT_AM) to this Analytic Type. To add Analytic Model click on “Model Tab” of Analytic Type and from Menu bar under Inset menu select “Analytic Model..”. Select the PM_HEADCOUNT_AM Analytic model and this will add into Analytic Type.
b) Save the Analytic Type as “PM_HEADCOUNT_AT”.
Step 5: Creating Analytic Instance.
a) Navigate to the Main Menu > PeopleTools > Utilities > Administration > Analytic Inst. Create/Del/Copy in the PIA.
b) Select the Analytic Type (PM_HEADCOUNT_AT) and Provide the Analytic Instance name (PM_HEADCOUNT_IN). Click on “Create Analytic Instance” button.
c) This will create the Analytic Instance “PM_HEADCOUNT_IN”.
Step 6: Load Analytic Instance.
a) Navigate to the Main Menu > PeopleTools > Utilities > Administration > Analytic Instance Load/Unload in the PIA.
b) Search for “PM_HEADCOUNT_IN” (i.e. Appropriate instance name according to you)
c) Click on “Load Analytic Instance” button from the below Screen to load the Analytic Instance.
Step 7: Verify Analytic Model using Analytic Model Viewer.
a) Navigate to the Main Menu > PeopleTools > Utilities > Administration > Analytic Model Viewer.
b) Search the Analytic Instance “PM_HEADCOUNT_IN” and click on the instance link.
c) Select the “PRESENTATIONCUBECOLLECTION” to view the Analytic Model functioning.
Step 8: Create a Page with Analytic Grid to associate the Analytic Model to Analytic Grid.
a) Create a Page and Place an Analytic Grid control to the Page.
b) Add the work record(PM_HDCOUNT_WRK) fields in the Analytic Grid which is as main record in “PRESENTATIONCUBECOLLETION” cube collection.
c) Set the properties of the Analytic grid as follows.
d) Analytics Instance in the Grid Properties shown above is the page field placed in the page and this field has the value of Analytic Instance which is created through online (PM_HEADCOUNT_IN). This value(Analytic Instance) is assigned in prebuild event of component. (Create a separate work record with a field to assign analytic instance on this. Analytic instance can be assigned as <Recod>.<Field>.Value = “<ANALYTIC_INSTANCE>” for this example PM_HEADCOUNT_WRK1.DESCR.Value = “PM_HEADCOUNT_IN”).
e) Save Page and Component. (INSTALLATION record can be used as search record to bypass search page).
f) Register the component and View the page online and see the Analytic Grid Functioning.
Note: Make sure “Analytic Server” is UP and running in “Application Server”.