Table Of Contents:
In order to implement the use of a sub-query, two Analyses will first need to be made. The analyses will use the 'Class Registration', 'Class', 'Student Academic Program', and 'Student Enrolled' tables within the Census Subject Area. With the use of a sub-query, the second analysis created will be able to use the results of the first analysis as a filter while displayed on a dashboard.
Please see the previous training documents if assistance is needed in building the Analysis.
The first analysis is the first piece of the training that will need to be completed. Open a new Analysis, use the Census Subject Area, and find the Class Registration and Class tables. Select the following columns to be queried:
Next, select the PERSON ID column, and sort by Sort Ascending.
Once completed, add the following Filters to the query:
The second analysis is the next step of the training that will need to be completed. Open a new Analysis, use the Census Subject Area, and find the Student Academic Program Desc and Student Enrolled tables. Select the following columns to be queried:
Once completed, add the following Filter to the query:
When the TERM CODE filter has been set, 'Delete' TERM CODE from the Selected Columns area.
Once completed, it is now time to create a sub-query in this analysis that uses the results of the first analysis as a filter.
As stated above, the sub-query's function is to use the results of another report as a filter. In this training, the sub-query created will use the PERSON ID in the first analysis as a filter. Therefore, the second analysis will reflect each PERSON ID displayed in the first analysis. The steps below will create this sub-query.
Next, select Dashboard from the 'New' dropdown in the menu bar (Depending on role privileges, you may have to select 'Edit' for the 'My Dashboard' located in the Catalog under 'My Folders'). In the pop-up, type the name, description, and save location. (Clicking SaveAs once in the Editor will bring up a similar pop-up)
Below is what the editor looks like, first we will go through the layout, and then we will continue with the example.
The dashboard objects are all of the different items that can be placed into a dashboard.
The 'Catalog' function is the same as in all the other areas of 11g and provides access to saved shared or personal dashboards.
On the left-hand side of the Dashboard editor page, under the Catalog section, locate the two analyses that were just created. Select the first analysis (Training 4_1) and drag it into the 'Drop Content Here' area. Notice that this action automatically creates a new section within a column.
Next, select the second analysis created under the Catalog section, and place it to the right of the first analysis under Section 1.
Save the Dashboard, and click the 'Run' button to see the sub-query in action. Your dashboard should look similar to this:
Notice how the PERSON ID's in the second analysis (the report on the right) reflect those in the first analysis. This is because of the sub-query that was created in the second analysis.