SETSLICESEGMENTPROPERTIES
An axis can contain one hierarchy or multiple hierarchies. The axis and its hierarchies contain data in rows or columns, depending on the axis type. Data can be split into sections, also called segments. Each segment can use an inverted or non-inverted display. Use the SETSLICESEGMENTPROPERTIES formula to define inversion settings. The formula can invert an entire hierarchy, all segments, or individual segments. Individual segment settings support configurations where one segment is inverted and another segment is not inverted.
This capability is available in standard slices, Ad-hoc Report, and Excel Integration.
Variable slices that use CREATESLICELISTSEGMENT and CREATESLICETUPLESEGMENTS do not provide a method to set inverted hierarchy properties. Report designers who create dynamic, formula-driven reports cannot apply inverted hierarchy settings in variable slices.
Use SETSLICESEGMENTPROPERTIES after you create slice segments and before you create the axis.
Formula sequence
CREATESLICELISTS
→ CREATESLICELISTSEGMENT / CREATESLICETUPLESEGMENTS
→ SETSLICESEGMENTPROPERTIES
→ CREATESLICEAXIS
→ CREATESLICEDEFINITION
Syntax
SETSLICESEGMENTPROPERTIES(segments, property_names, property_values)
Parameters
This table shows the available parameters:
| Parameter | Requirement | Data type | Description | Simple mode |
|---|---|---|---|---|
segments |
Required | Object | Passes the segment object that CREATESLICELISTSEGMENT or CREATESLICETUPLESEGMENTS returns. |
Not applicable. |
property_names |
Required | String or array | Specifies the properties to set. | Passes a property name or a simple array of property names. The property values apply to all hierarchies. |
property_values |
Required | String or array | Specifies the values to assign. |
Pass a simple array that contains a value for each property. If you specify one property, pass a single value. The specified values apply to all segments and hierarchies. To specify different values per hierarchy, pass array of values for each hierarchy. The outer array contains one entry for each hierarchy in the same order hierarchies of the segment. Each inner array contains either |
Return value
Returns a new segment object with the specified properties applied. The original input object remains unchanged.
Passes the returned segment object to CREATESLICEAXIS.
You can call the function multiple times in sequence to apply additional property assignments.
Available properties
This table shows the available properties:
| Property | Default value | When set to TRUE |
When set to FALSE |
Additional details |
|---|---|---|---|---|
inverthierarchy |
FALSE |
Children appear before parents. The generated MDX uses
. The layout uses a bottom-up hierarchy. Totals and subtotals appear below the detail lines that they summarize. |
Standard top-down hierarchy order is used. If the property is not set, standard top-down hierarchy order is used. | The property is evaluated independently for each hierarchy and each segment. One hierarchy can use inversion while another hierarchy on the same axis does not use inversion. The same hierarchy can use inversion in one segment and not use inversion in another segment. |
hierarchized |
TRUE |
Standard hierarchical display is used. The display includes indentation and expand/collapse controls. If the property is not set, standard hierarchical display is used. | The Hierarchize() operation is not applied to the segment. The segment displays members in their natural order. The display does not include expand and collapse (+/−) controls. |
The property is evaluated independently for each hierarchy and each segment. One hierarchy can use hierarchical display while another hierarchy on the same axis does not use hierarchical display. The same hierarchy can use hierarchical display in one segment and not use hierarchical display in another segment. |
Value interpretation
Compare values case-insensitively.
Treat the literal text true as boolean TRUE, regardless of letter casing. Accepted examples: "TRUE", "True", and "true".
Treat any text other than the literal text true as boolean FALSE. Examples include "false", "FALSE", "0", an empty string, and any other text value.
Completeness rule
Advanced array mode requires complete definitions.
Specify property names and property values for every segment and every hierarchy.
Array mode does not apply default values and does not skip entries.
An error occurs if any required entry is missing or if surplus entries exist.
Error conditions
The operation returns #VALUE! and applies no properties when a property name is not recognized. Supported property names are inverthierarchy and hierarchized.
Property lists must be identical across all segments and must contain all required properties. A violation returns #VALUE!.
The number of rows in property_values must match the number of hierarchies in the segment. A mismatch returns #VALUE!.
property_values array must contain
propertyCount ×
segmentCount values or propertyCount values. Any other length returns #VALUE!.
The outer property_names array must contain one entry for every segment. Missing segment coverage returns #VALUE!.
No partial modification is applied. The operation either applies all properties successfully or fails completely.
Usage example
=SETSLICESEGMENTPROPERTIES(C8; ARRAY("hierarchized";"inverthierarchy";""); ARRAY(TRUE;FALSE;""))
Sets both, hierarchized and inverthierarchy properties into the segment in C8 cell with one function.