Class SlicerCacheLevel (Excel VBA)

The class SlicerCacheLevel represents a level of a hierarchy in an OLAP data source being filtered by a slicer.

Set

To use a SlicerCacheLevel class variable it first needs to be instantiated, for example

Dim slc As SlicerCache: Set slc = 
Dim slcclSlicerCacheLevel As SlicerCacheLevel
Set slcclSlicerCacheLevel = slc.SlicerCacheLevels

The following procedures can be used to set variables of type SlicerCacheLevel: Slicer.SlicerCacheLevel, SlicerCacheLevels.Item and SlicerCache.SlicerCacheLevels

For Each

Here is an example of processing the SlicerCacheLevel items in a collection.

Dim slc As SlicerCache: Set slc = 
Dim slcclSlicerCacheLevel As SlicerCacheLevel
For Each slcclSlicerCacheLevel In slc.SlicerCacheLevels
	
Next slcclSlicerCacheLevel

Properties

Count returns the number of SlicerItem objects in the specified SlicerCacheLevel object.

CrossFilterType returns or sets whether a slicer is participating in cross filtering with other slicers that share the same slicer cache, and how cross filtering is displayed.

Name returns the MDX unique name of the OLAP hierarchy level represented by the object.

Ordinal returns the one-based ordinal value of the hierarchy level represented by the specified SlicerCacheLevel object.

Parent returns the SlicerCache slicercache for the specified SlicerCacheLevel slicercache. Read-only.

SlicerItems returns a SlicerItems collection that contains the collection of all slicer items for the specified level.

SortItems returns or sets the sort order of the items in the slicer.

VisibleSlicerItemsList returns the list of slicer items that are currently included in the slicer filter.

SlicerCacheLevels.Count returns the number of levels in the specified SlicerCacheLevels collection, which represents the number of levels in the associated SlicerCache object.

SlicerCacheLevels.Item returns the specified SlicerCacheLevel object from the collection, or if no level is specified, returns the first SlicerCacheLevel object in the collection.

ActiveWorkbook.SlicerCaches("Slicer_Country"). _ 
 SlicerCacheLevels("[Customer].[Customer Geography].[Country]")

SlicerCacheLevels.Parent returns the SlicerCache object that is the parent of the specified SlicerCacheLevels object. Read-only.