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

Function dateRelativeFrom

dateRelativeFrom( level, offset, count, anchor?, config?): Filter

Creates a filter to isolate items with a date dimension value within a specified range after a given date and level.

Parameters

ParameterTypeDescription
levelLevelAttributeDate LevelAttribute to filter on
offsetnumberNumber of levels to skip from the given anchor or the default of the current day (e.g. 6 is 6 months when level is a months level attribute)
countnumberNumber of levels to include in the filter (e.g. 6 is 6 months when level is a months level attribute)
anchor?Date | stringDate to filter from, defaults to the current day
config?BaseFilterConfigOptional configuration for the filter

Returns

Filter

A filter instance

Example

Filter for items in the Sample ECommerce data model where the date is in 2011 or the first half of 2012.

filterFactory.dateRelativeFrom(DM.Commerce.Date.Months, 0, 18, '2011-01'),
Last Updated: