Forum Discussion

jsteffe's avatar
jsteffe
Helper III
3 years ago
Solved

Date period filter

Hello,   I manage animal movements in buildings. I get this table MOVEMENT : ID_movement, entry_date (in the building), exit_date (of the building), number of animals, building_id   When I choos...
  • v-yanjiang-msft's avatar
    3 years ago

    Hi jsteffe ,

    According to your description, here's my solution.

    Create a measure:

    Measure =
    IF (
        MAX ( 'Table'[start date] ) <= SELECTEDVALUE ( 'Date'[Date] )
            && COALESCE ( MAX ( 'Table'[end date] ), TODAY () )
                >= SELECTEDVALUE ( 'Date'[Date] ),
        1,
        0
    )
    

    Put the measure in the visual level filter and select "is 1".

    After apply filter, get the correct result:

    I attach my sample below for your reference.

     

    Best regards,

    Community Support Team_yanjiang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.