Forum Discussion

NiemansYolo's avatar
NiemansYolo
New Member
2 years ago
Solved

Data Slicing on two specific Dates

Hello everyone,

I wanna select two specific dates in my data slicers (e.g. 03.01.2022 and 30.12.2022) and only show/select the data on those two dates.

The first data slicer should select the first date (by manually entering the date by a user if possible).
The second data slicer should select the second date (by manually entering the date by a user if possible).
(clicking in a calander view would als be applicable)

-> Show Data on Date1 + Date2 (not inbetween!!!).

Can anyone help me out with a solution?

Thanks in advance

  • Hello NiemansYolo,

     

    Can you please try this:

     

    1. Set Up Two Date Slicers (Set both slicers to use the date field from your data)

    2. Create Two Measures to Capture the Slicer Values

    Selected Date 1 = MIN('YourTable'[DateField])
    Selected Date 2 = MAX('YourTable'[DateField])

    3. Filter Your Data Based on the Slicer Selections

    Date Filter = 
    VAR Date1 = [Selected Date 1]
    VAR Date2 = [Selected Date 2]
    RETURN
    IF(
        SELECTEDVALUE('YourTable'[DateField]) = Date1 || 
        SELECTEDVALUE('YourTable'[DateField]) = Date2,
        1,
        BLANK()
    )

    Should you require any further assistance, please do not hesitate to reach out to me.

1 Reply

  • Hello NiemansYolo,

     

    Can you please try this:

     

    1. Set Up Two Date Slicers (Set both slicers to use the date field from your data)

    2. Create Two Measures to Capture the Slicer Values

    Selected Date 1 = MIN('YourTable'[DateField])
    Selected Date 2 = MAX('YourTable'[DateField])

    3. Filter Your Data Based on the Slicer Selections

    Date Filter = 
    VAR Date1 = [Selected Date 1]
    VAR Date2 = [Selected Date 2]
    RETURN
    IF(
        SELECTEDVALUE('YourTable'[DateField]) = Date1 || 
        SELECTEDVALUE('YourTable'[DateField]) = Date2,
        1,
        BLANK()
    )

    Should you require any further assistance, please do not hesitate to reach out to me.