AdvancedFilterBuilder class

Power BI Advanced filter builder component

Extends

Inherited Properties

target

Methods

addCondition(AdvancedFilterConditionOperators, string | number | boolean | Date)

Adds a condition in Advanced filter


// Add two conditions
const advancedFilterBuilder = new AdvancedFilterBuilder().addCondition("Contains", "Wash").addCondition("Contains", "Park");
and()

Sets And as logical operator for Advanced filter


const advancedFilterBuilder = new AdvancedFilterBuilder().and();
build()

Creates Advanced filter


const advancedFilterBuilder = new AdvancedFilterBuilder().build();
or()

Sets Or as logical operator for Advanced filter


const advancedFilterBuilder = new AdvancedFilterBuilder().or();

Inherited Methods

withColumnAggregation(string, string, string)

Sets target property for filter with column aggregation target object

const filterBuilder = new FilterBuilder().withColumnAggregation(tableName, columnName, aggregationFunction);
withColumnTarget(string, string)

Sets target property for filter with column target object

const filterBuilder = new FilterBuilder().withColumnTarget(tableName, columnName);
withHierarchyLevelAggregationTarget(string, string, string, string)

Sets target property for filter with hierarchy level aggregation target object

const filterBuilder = new FilterBuilder().withHierarchyLevelAggregationTarget(tableName, hierarchy, hierarchyLevel, aggregationFunction);
withHierarchyLevelTarget(string, string, string)

Sets target property for filter with hierarchy level target object

const filterBuilder = new FilterBuilder().withHierarchyLevelTarget(tableName, hierarchy, hierarchyLevel);
withMeasureTarget(string, string)

Sets target property for filter with measure target object

const filterBuilder = new FilterBuilder().withMeasureTarget(tableName, measure);
withTargetObject(IFilterTarget)

Sets target property for filter with target object

const target = {
 table: 'table1',
 column: 'column1'
};

const filterBuilder = new FilterBuilder().withTargetObject(target);

Inherited Property Details

target

target: IFilterTarget

Property Value

Inherited From FilterBuilder.target

Method Details

addCondition(AdvancedFilterConditionOperators, string | number | boolean | Date)

Adds a condition in Advanced filter


// Add two conditions
const advancedFilterBuilder = new AdvancedFilterBuilder().addCondition("Contains", "Wash").addCondition("Contains", "Park");
function addCondition(operator: AdvancedFilterConditionOperators, value?: string | number | boolean | Date): AdvancedFilterBuilder

Parameters

value

string | number | boolean | Date

Returns

and()

Sets And as logical operator for Advanced filter


const advancedFilterBuilder = new AdvancedFilterBuilder().and();
function and(): AdvancedFilterBuilder

Returns

build()

Creates Advanced filter


const advancedFilterBuilder = new AdvancedFilterBuilder().build();
function build(): AdvancedFilter

Returns

or()

Sets Or as logical operator for Advanced filter


const advancedFilterBuilder = new AdvancedFilterBuilder().or();
function or(): AdvancedFilterBuilder

Returns

Inherited Method Details

withColumnAggregation(string, string, string)

Sets target property for filter with column aggregation target object

const filterBuilder = new FilterBuilder().withColumnAggregation(tableName, columnName, aggregationFunction);
function withColumnAggregation(tableName: string, columnName: string, aggregationFunction: string): AdvancedFilterBuilder

Parameters

tableName

string

columnName

string

aggregationFunction

string

Returns

Inherited From FilterBuilder.withColumnAggregation

withColumnTarget(string, string)

Sets target property for filter with column target object

const filterBuilder = new FilterBuilder().withColumnTarget(tableName, columnName);
function withColumnTarget(tableName: string, columnName: string): AdvancedFilterBuilder

Parameters

tableName

string

columnName

string

Returns

Inherited From FilterBuilder.withColumnTarget

withHierarchyLevelAggregationTarget(string, string, string, string)

Sets target property for filter with hierarchy level aggregation target object

const filterBuilder = new FilterBuilder().withHierarchyLevelAggregationTarget(tableName, hierarchy, hierarchyLevel, aggregationFunction);
function withHierarchyLevelAggregationTarget(tableName: string, hierarchy: string, hierarchyLevel: string, aggregationFunction: string): AdvancedFilterBuilder

Parameters

tableName

string

hierarchy

string

hierarchyLevel

string

aggregationFunction

string

Returns

Inherited From FilterBuilder.withHierarchyLevelAggregationTarget

withHierarchyLevelTarget(string, string, string)

Sets target property for filter with hierarchy level target object

const filterBuilder = new FilterBuilder().withHierarchyLevelTarget(tableName, hierarchy, hierarchyLevel);
function withHierarchyLevelTarget(tableName: string, hierarchy: string, hierarchyLevel: string): AdvancedFilterBuilder

Parameters

tableName

string

hierarchy

string

hierarchyLevel

string

Returns

Inherited From FilterBuilder.withHierarchyLevelTarget

withMeasureTarget(string, string)

Sets target property for filter with measure target object

const filterBuilder = new FilterBuilder().withMeasureTarget(tableName, measure);
function withMeasureTarget(tableName: string, measure: string): AdvancedFilterBuilder

Parameters

tableName

string

measure

string

Returns

Inherited From FilterBuilder.withMeasureTarget

withTargetObject(IFilterTarget)

Sets target property for filter with target object

const target = {
 table: 'table1',
 column: 'column1'
};

const filterBuilder = new FilterBuilder().withTargetObject(target);
function withTargetObject(target: IFilterTarget): AdvancedFilterBuilder

Parameters

target
IFilterTarget

Returns

Inherited From FilterBuilder.withTargetObject