RelativeDateFilterBuilder class

Power BI Relative Date filter builder component

Extends

Inherited Properties

target

Methods

build()

Creates Relative Date filter


const relativeDateFilterBuilder = new RelativeDateFilterBuilder().build();
includeToday(boolean)

Sets includeToday for Relative Date filter


const relativeDateFilterBuilder = new RelativeDateFilterBuilder().includeToday(includeToday);
inLast(number, RelativeDateFilterTimeUnit)

Sets inLast as operator for Relative Date filter


const relativeDateFilterBuilder = new RelativeDateFilterBuilder().inLast(timeUnitsCount, timeUnitType);
inNext(number, RelativeDateFilterTimeUnit)

Sets inNext as operator for Relative Date filter


const relativeDateFilterBuilder = new RelativeDateFilterBuilder().inNext(timeUnitsCount, timeUnitType);
inThis(number, RelativeDateFilterTimeUnit)

Sets inThis as operator for Relative Date filter


const relativeDateFilterBuilder = new RelativeDateFilterBuilder().inThis(timeUnitsCount, timeUnitType);

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

build()

Creates Relative Date filter


const relativeDateFilterBuilder = new RelativeDateFilterBuilder().build();
function build(): RelativeDateFilter

Returns

includeToday(boolean)

Sets includeToday for Relative Date filter


const relativeDateFilterBuilder = new RelativeDateFilterBuilder().includeToday(includeToday);
function includeToday(includeToday: boolean): RelativeDateFilterBuilder

Parameters

includeToday

boolean

Denotes if today is included or not

Returns

inLast(number, RelativeDateFilterTimeUnit)

Sets inLast as operator for Relative Date filter


const relativeDateFilterBuilder = new RelativeDateFilterBuilder().inLast(timeUnitsCount, timeUnitType);
function inLast(timeUnitsCount: number, timeUnitType: RelativeDateFilterTimeUnit): RelativeDateFilterBuilder

Parameters

timeUnitsCount

number

The amount of time units

timeUnitType
RelativeDateFilterTimeUnit

Defines the unit of time the filter is using

Returns

inNext(number, RelativeDateFilterTimeUnit)

Sets inNext as operator for Relative Date filter


const relativeDateFilterBuilder = new RelativeDateFilterBuilder().inNext(timeUnitsCount, timeUnitType);
function inNext(timeUnitsCount: number, timeUnitType: RelativeDateFilterTimeUnit): RelativeDateFilterBuilder

Parameters

timeUnitsCount

number

The amount of time units

timeUnitType
RelativeDateFilterTimeUnit

Defines the unit of time the filter is using

Returns

inThis(number, RelativeDateFilterTimeUnit)

Sets inThis as operator for Relative Date filter


const relativeDateFilterBuilder = new RelativeDateFilterBuilder().inThis(timeUnitsCount, timeUnitType);
function inThis(timeUnitsCount: number, timeUnitType: RelativeDateFilterTimeUnit): RelativeDateFilterBuilder

Parameters

timeUnitsCount

number

The amount of time units

timeUnitType
RelativeDateFilterTimeUnit

Defines the unit of time the filter is using

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): RelativeDateFilterBuilder

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): RelativeDateFilterBuilder

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): RelativeDateFilterBuilder

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): RelativeDateFilterBuilder

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): RelativeDateFilterBuilder

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): RelativeDateFilterBuilder

Parameters

target
IFilterTarget

Returns

Inherited From FilterBuilder.withTargetObject