Before You Begin
This tutorial shows you how to narrow the members of a hierarchy structure to use in Oracle Analytics visualizations.
Background
In Oracle Analytics, you can use selection steps to specify the levels or members of a hierarchy. You can use a table or pivot visualization for the results of the selection steps. Oracle Analytics supports using selection steps with level-based hierarchies, parent-child hierarchies, and skip-level or ragged hierarchy structures.
Selection steps are top-down, for example, from the parent to the child node or from year to quarter. You would need to select the higher level and then define a lower-level step next.
Selection steps only apply to hierarchy structures and impact visualizations that support hierarchy structures such as tables and pivots.
What Do You Need?
- Access to Oracle Analytics
- Access to a dataset with hierarchy structures
Create a Workbook
In this section, you create a workbook with a local subject area to use as the data source and then create a table visualization with a level hierarchy and a fact column.
- Sign in to Oracle Analytics.
- On the Home page, click Create. In Create, click Workbook. In Add Data select a dataset, and the click Add to Workbook.
This tutorial uses a local subject area
, Sample Sales.
- In the Data
pane, expand a data element containing a hierarchy.
This tutorial expands the Time data element which contains two hierarchy
structures.
Description of the illustration time_data_element.png - In the Data pane, select a hierarchy and drag it to the canvas.
This tutorial drags the Time Hierarchy to the canvas.
Description of the illustration time_hierarchy_table.png - In the Data pane, drag a fact or measure related to the hierarchy data element to the table.
This tutorial expands Facts, expands Base Facts, and then drags Revenue to Rows in the Grammar pane under Time Hierarchy.
Description of the illustration table_wo_selection_steps.png
Refine Your Selection Steps
In this section, you use selection steps to choose the levels or members of the hierarchy to reveal in the table visualization.
- In the Data pane, select a hierarchy
and drag it to the filter bar.
This tutorial drags the Time Hierarchy to the filter bar. The Selection Steps dialog opens with Keep Only as the default action and Members as the default operator. The selection value is empty.
Description of the illustration selection_steps_dialog.png - In Selection Steps, use the default Keep Only in Actions. Click list
in Operators, and then select Levels.
- In value, click list
and select a value.
This tutorial expands Total Time and selects Year. In this example, query results don't change in the table with Levels as the operator.
Description of the illustration time_level_year.png - Click the hierarchy
in the filter bar. In hierarchy selection steps, click Add Step
.
- Click Keep Only in the Actions list
and select Remove. Keep Members in Operators. In value, click list
and select a value. Hold down the Ctrl key to select multiple values.
This tutorial adds a Remove action step in selection steps to exclude members 2009 and 2010.
Description of the illustration remove_members.png The table visualization shows revenue for 2008 by quarter, month, and day.
Description of the illustration just_2008_rev.png
Choose Members as the Operator in Selection Steps
In this section, you start with Members as the operator in the first selection step to change the query.
- Click the hierarchy
in the filter bar. Click Remove Step
to delete the actions, operators, and values in each selection step.
Oracle Analytics updates the table to show the Time Hierarchy table without selection steps.
Description of the illustration no_select_steps.png - In Selection Steps, use Keep Only as the action and keep Members as the operator. In value, click list
and select a value.
This tutorial selects 2008 as the value.
- In Selection Steps, click Add Step
. In Selection Steps, use Keep Only as the action, click Members
in Operators, and then select Levels. In value, click list
and select a value.
This tutorial selects Month as the value. The result shows the values for each day of the month.
Description of the illustration time_year_month_day.png - Click the hierarchy
in the filter bar.
- In Selection Steps, click Add Step
. In Selection Steps, click Keep Only in the Actions list
and select Remove.
- In Operators, click Members and select Levels. Click list
to select a value.
This tutorial selects Day as the values to remove from the query. The table updates to show the total revenue by month in 2008.
Description of the illustration year_month_rev2008.png
Select Members in a Parent-child Hierarchy
In this section, you use a parent-child hierarchy to demonstrate how to use selection steps. This example uses the same Sample Sales local subject area as in the previous sections.
- In the Data
pane, select a parent-child hierarchy
and drag it to the canvas to create a new visualization.
This tutorial expands Sales Person in the Data panel and drags the Sales Rep Hierarchy to the canvas creating a new table visualization in the workbook.
- Expand the rows in the table to show the parent-child relationships.
The canvas shows that the Time Hierarchy in the filter bar doesn't change the Sales Rep Hierarchy table.
Description of the illustration sales_rep_hier.png - In the Data pane, drag a fact or measure related to the Sales Rep element to the table.
This tutorial expands Facts, expands Base Facts, and then drags Revenue to Rows in the Grammar pane under Sales Rep Hierarchy.
- In the Data pane, drag the same parent-child hierarchy to the filter bar.
This tutorial drags the Sales Rep Hierarchy to the filter bar.
When defining selection steps for a parent-child hierarchy, you can choose nodes in the hierarchy. Levels is not available as an operator.
Description of the illustration parent_child_operators.png - In Selection Steps, use Keep Only as the action and Member as the operator, and in value, click list
. In value, click list
and select a value.
This tutorial uses Keep Only as the action, Members as the operator, and selects Monica Velasquez as the value.
Description of the illustration monica_v_children.png - Click the parent-child hierarchy
in the filter bar. Click Add Step
. In Actions, click Keep Only and select Remove.
- Click Members in Operators and select Children. In value, click list
, hold down the Ctrl key, and the select the children to remove from the query.
This tutorial uses the Ctrl key to select all of Monica's subordinate sale representatives.
Description of the illustration monica_no_children.png
Learn More
Select Members of a Hierarchy Column in Oracle Analytics
G25345-01
March 2025
Learn how to select members of a hierarchy structure in an Oracle Analytics workbook.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.