Forum Discussion

kjohn10's avatar
kjohn10
Helper I
8 years ago
Solved

Adding constant from table as filter to date column

I want to provide a selectable "window" of days (from -10 to +10) to add to a date column. The window of days will be a slicer and the user can select one, which should update the column of dates day...
  • v-huizhn-msft's avatar
    8 years ago

    Hi kjohn10,

    We can not create a dynamic calculated column based on slicer, please review this knowledge base. For your requirement, you can create a measure using the formula below rather than calculated column.

    Adjusted Date_test =
    DATEADD (
        FIRSTNONBLANK ( DateKey[Date], DateKey[Date] ),
        SELECTEDVALUE ( Query1[DayChange] ),
        DAY
    )
    


    Create a table visual, and select DateKey[Date], measure as value, you will get expected result as follows.

    select 3 in slicerselect -1 in slicer
    Please download attachment for more details.

    Best Regards,
    Angelia