Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Fátima
Helper II
Helper II

Filter two dates with just one filter

Hi!

 

I need to filter two columns by one given date. For example, I have registries with the columns "START_DATE" and "END_DATE", so by filtering by date it would return the registries which start_date is before the filter date, and the end date is after the filter date. In other words, I need the registries in which dates range is the date of the filter.

 

Is this possible to do with a date slicer? I have tried to create one and set both fields to filter, but it doesn't allow me to use the slider nor to set different options (greater than and smaller than) for each column. If not, how can I set a filter that allows me to do this?

 

Thanks! Regards!

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Fátima 

 

You can try the following methods.

Sample data:

vzhangti_0-1675406786905.png

New table:

Date = CALENDAR(MIN('Table'[START_DATE]),MAX('Table'[END_DATE]))
Measure =
IF ( SELECTEDVALUE ( 'Date'[Date] ) = BLANK (), 1,
    IF ( SELECTEDVALUE ( 'Date'[Date] ) >= SELECTEDVALUE ( 'Table'[START_DATE] )
         && SELECTEDVALUE ( 'Date'[Date] ) <= SELECTEDVALUE ( 'Table'[END_DATE] ),
        1,
        0
    )
)

vzhangti_1-1675407153857.png

Result:

vzhangti_2-1675407582963.png

vzhangti_3-1675407614973.png

Hope this method helps you.

 

Best Regards,

Community Support Team _Charlotte

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

 

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Fátima 

 

You can try the following methods.

Sample data:

vzhangti_0-1675406786905.png

New table:

Date = CALENDAR(MIN('Table'[START_DATE]),MAX('Table'[END_DATE]))
Measure =
IF ( SELECTEDVALUE ( 'Date'[Date] ) = BLANK (), 1,
    IF ( SELECTEDVALUE ( 'Date'[Date] ) >= SELECTEDVALUE ( 'Table'[START_DATE] )
         && SELECTEDVALUE ( 'Date'[Date] ) <= SELECTEDVALUE ( 'Table'[END_DATE] ),
        1,
        0
    )
)

vzhangti_1-1675407153857.png

Result:

vzhangti_2-1675407582963.png

vzhangti_3-1675407614973.png

Hope this method helps you.

 

Best Regards,

Community Support Team _Charlotte

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

 

amitchandak
Super User
Super User

@Fátima , refer to this example, it uses a date table, two dates

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors