Forum Discussion

jflores's avatar
jflores
Frequent Visitor
1 year ago
Solved

Reverse Filter Measure not working

Hello Community,   I'm an Inventory Items table that contains, amount other fields, Item ID, Description and Last Movement Date.  I'm trying to get the a date slicer to give me the items OUTSIDE th...
  • Kedar_Pande's avatar
    1 year ago

    Reverse Date Measure =
    VAR SelectedMinDate = MIN(Date_Helper[Date])
    VAR SelectedMaxDate = MAX(Date_Helper[Date])

    VAR DebugCheck = IF(
    ISBLANK(SelectedMinDate) || ISBLANK(SelectedMaxDate),
    "No Slicer Selection",
    "Slicer Active"
    )

    RETURN
    IF(
    DebugCheck = "No Slicer Selection",
    DebugCheck,
    CALCULATE(
    COUNTROWS('Item Master'),
    ALL(Date_Helper), -- Remove date slicer context temporarily
    'Item Master'[Last_Movement_Date] < SelectedMinDate || 'Item Master'[Last_Movement_Date] > SelectedMaxDate,
    NOT(ISBLANK('Item Master'[Last_Movement_Date]))
    )
    )

    If the slicer is based on a Date_Helper table, ensure that it is properly linked to your Item Master table by the Last_Movement_Date field.