INITSLICERS

In dynamic reports, users are often able to choose which dimensions form the columns and rows, and which form the slice dimensions. And, in database-independent reports, which dimensions are available is unknown to the designer of the report. For this reason, the values of the slice dimensions are typically stored in an XML variable. If the report uses the tuple report parameter for communication in Dashboards, the XML must be in a valid format.

The INITSLICERS function generates an XML slicer variable in the correct format to be used by the tuple report parameter.

You can validate the XML with the VALIDATESLICERS function.

See VALIDATESLICERS.

Syntax

=INITSLICERS("OlapMetaDataUniqueName","list of Olap Metadata hierachies or dimensions to exclude")

Example

This example is based on the Best Practices sample database. It generates XML which excludes all but the Measure dimension of the Analysis cube:

=INITSLICERS("[repository].[best practices olap].[analysis]","[repository].[best practices olap].[analysis].[period]","[repository].[best practices olap].[analysis].[pos]","[repository].[best practices olap].[analysis].[product]","[repository].[best practices olap].[analysis].[region]","[repository].[best practices olap].[analysis].[channel]","[repository].[best practices olap].[analysis].[valtype]")

This is the resultant XML:

<Table><Row name="[Repository].[Best Practices OLAP].[ANALYSIS].[MEASURE].[MEASURE]"><Property name="element" value="[MEASURE].[Gross Margin]" /></Row></Table>

Example

In cell B2, specify [repository].[best practices olap].[analysis].

In cell B23, specify =INITSLICERS(B2).

The resulting XML includes all dimensions of the Analysis cube:

<Table><Row name="[Repository].[Best Practices
			 OLAP].[ANALYSIS].[CHANNEL].[CHANNEL]"><Property name="element"
			 value="[CHANNEL].[All Channels]" /></Row><Row
			 name="[Repository].[Best Practices
			 OLAP].[ANALYSIS].[MEASURE].[MEASURE]"><Property name="element"
			 value="[MEASURE].[Gross Margin]" /></Row><Row
			 name="[Repository].[Best Practices
			 OLAP].[ANALYSIS].[Period].[Period]"><Property name="element"
			 value="[Period].[All Years]" /></Row><Row name="[Repository].[Best
			 Practices OLAP].[ANALYSIS].[POS].[POS]"><Property name="element"
			 value="[POS].[All Pos]" /></Row><Row name="[Repository].[Best
			 Practices OLAP].[ANALYSIS].[PRODUCT].[PRODUCT]"><Property name="element"
			 value="[PRODUCT].[All Tires]" /></Row><Row name="[Repository].[Best
			 Practices OLAP].[ANALYSIS].[REGION].[REGION]"><Property name="element"
			 value="[REGION].[All Regions]" /></Row><Row
			 name="[Repository].[Best Practices
			 OLAP].[ANALYSIS].[VALTYPE].[VALTYPE]"><Property name="element"
			 value="[VALTYPE].[Variance]" /></Row></Table>