Tableau Embedding API
    Preparing search index...

    Interface HierarchicalFilter

    A Hierarchical Filter Hierarchical Filters are used when a hierarchical field is used as a filter on a cube database. As an example, assume a hierarchical field in Product, named ByCategory. ByCategory has the following five levels: Family, Category, Subcategory, Brand, Sku.

    interface HierarchicalFilter {
        appliedValues: HierarchicalFilterDataValue[];
        dimensionName: string;
        fieldId: string;
        fieldName: string;
        filterType: FilterType;
        hierarchyCaption: string;
        isAllSelected: boolean;
        levelDetails: HierarchicalLevelDetail[];
        numberOfLevels: number;
        worksheetName: string;
        getAppliedWorksheetsAsync(): Promise<string[]>;
        getFieldAsync(): Promise<Field>;
        setAppliedWorksheetsAsync(applyToWorksheets: string[]): Promise<string[]>;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Returns Promise<string[]>

      the list of worksheet names that have the filter applied.

    • Returns Promise<Field>

      a promise containing the field for the filter.

    • Applies the filter to the specified list of worksheets. If the worksheet(s) do not exist or do not contain the field in their data sources, an exception is thrown.

      Parameters

      • applyToWorksheets: string[]

        list of worksheets to apply the filter on

      Returns Promise<string[]>

      the list of worksheet names that have the filter applied

    Properties

    A list of values applied to this hierarchical filter.

    dimensionName: string

    The dimension name associated with the filter. In the ByCategory filter example, this would be 'Product'

    fieldId: string

    The id of the field being filtered.

    fieldName: string

    The name of the field being filtered. Note that this is the caption as shown in the UI, and not the actual database field name.

    filterType: FilterType

    The type of the filter.

    hierarchyCaption: string

    The hierarchy caption associated with the filter. In the ByCategory filter example, this would be '[Product].[ByCategory]'

    isAllSelected: boolean

    True if all the values are selected for this filter. When 'All' is selected, appliedValues returns an empty list.

    levelDetails: HierarchicalLevelDetail[]

    Details about each level in the hierarchical filter.

    numberOfLevels: number

    The number of levels in the hierarchical filter. In the ByCategory filter example, this would be 5

    worksheetName: string

    The parent worksheet.