Forum Discussion

FilipaPereira's avatar
FilipaPereira
Frequent Visitor
7 months ago
Solved

Filter with two dates

I have a dashboard based on this table and I need a date filter that filters the data between the start date and the end date.
The start date and end date are different columns.
Is it possible to have a filter between these two dates?

 

 

 

 

 

 

  • Anonymous's avatar
    Anonymous
    7 months ago

    Hi FilipaPereira ,

    Thank you for reaching out to the Microsoft Fabric Community Forum. 

     

    Could you please let us know if the issue has been resolved? I wanted to check if you had the opportunity to review the information provided. If you still require support, please let us know, we are happy to assist you. Thank you for all the members who have already provided helpful responses.

     

    Thank you.

5 Replies

  • Yes, this is possible, but it can’t be done with a standard date slicer alone because slicers work on one date column at a time. You need to model the logic explicitly.

     

    Use one Date table and check whether the selected date range overlaps your Start/End dates.

    1) Create / use a Date table

    Mark it as a Date table.

    2) Create a measure

    In Date Range =
    VAR MinSelDate = MIN ( 'Date'[Date] )
    VAR MaxSelDate = MAX ( 'Date'[Date] )
    RETURN
    IF (
        MAX ( Fact[StartDate] ) <= MaxSelDate
            && MAX ( Fact[EndDate] ) >= MinSelDate,
        1,
        0
    )

    3) Use it

    • Put 'Date'[Date] on a Between slicer

    • Add In Date Range = 1 as a visual-level filter

    This keeps rows where the date interval overlaps the slicer selection.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi FilipaPereira ,

    Thank you for reaching out to the Microsoft Fabric Community Forum. 

     

    Could you please let us know if the issue has been resolved? I wanted to check if you had the opportunity to review the information provided. If you still require support, please let us know, we are happy to assist you. Thank you for all the members who have already provided helpful responses.

     

    Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi FilipaPereira ,

     

    We haven’t received an update from you in some time. Could you please let us know if the issue has been resolved?
    If you still require support, please let us know, we are happy to assist you.

     

    Thank you.