sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Function measureBetween

measureBetween( measure, valueA, valueB, config?): Filter

Creates a filter to isolate a measure value between or equal to two given numbers or dates.

Parameters

ParameterTypeDescription
measureBaseMeasure | CalculatedMeasureMeasure to filter by
valueADate | number | stringMin value. For a date measure pass a Date or an ISO 8601 string.
A number is only valid for a numeric measure.
valueBDate | number | stringMax value. For a date measure pass a Date or an ISO 8601 string.
A number is only valid for a numeric measure.
config?BaseFilterConfigOptional configuration for the filter

Returns

Filter

A filter instance

Example

Filter for categories that have an average revenue greater than or equal to 50 and less than or equal to 100 in the Sample ECommerce data model.

filterFactory.measureBetween(
  measureFactory.average(DM.Commerce.Revenue),
  50,
  100
)

Example

Filter for categories whose last order falls in the fourth quarter of 2013 in the Sample ECommerce data model.

filterFactory.measureBetween(
  measureFactory.max(DM.Commerce.Date.Days),
  new Date('2013-10-01T00:00:00'),
  new Date('2013-12-31T23:59:59')
)
Last Updated: