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
Kurren
Helper II
Helper II

Date filter on a date range?

I have a fact table with two columns, "start date" and "end date". I want a date range filter slider in my report, but I want the filter to select all rows where the start and end dates fall within the slider.

 

Eg if we have the following rows:

 

IDStart date  End date
11 Mar 2020  1 Oct 2020
21 Aug 2020  1 Apr 2021
31 Aug 2019  1 Mar 2020

 

and the date filter starts at "1 Jan 2020" and ends at "31 Dec 2020", then only row 1 should pass the filter and be shown on the report, as the start date and end date fall within the range.

 

Is this possible?

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

Hi @Kurren 

 

It is normal operation. but please ensure to have a independent date table for the slicer/slider.

The measure shall look like this:

 

DurationSum :=

VAR _min = MIN(DateTable[Date])

VAR _max = MAX(DateTable[Date])

RETURN 

CALCULATE(

    SUM(TableName[Value]),

    TableName[StartDate]<=_min

        &&TableName[EndDate]<=_max

)

 

just try and let us know. 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Kurren,

According to your description, it seems like a common multiple date range analysis requirement. I'd like to suggest you take a look at following link start date, end date part if it suitable for your requirement:

Before You Post, Read This 

Regards,

Xiaoxin Sheng

FreemanZ
Super User
Super User

Hi @Kurren 

 

It is normal operation. but please ensure to have a independent date table for the slicer/slider.

The measure shall look like this:

 

DurationSum :=

VAR _min = MIN(DateTable[Date])

VAR _max = MAX(DateTable[Date])

RETURN 

CALCULATE(

    SUM(TableName[Value]),

    TableName[StartDate]<=_min

        &&TableName[EndDate]<=_max

)

 

just try and let us know. 

Thanks. Only difference is I had to REMOVEFILTERS the existing date filter within the CALCULATE function. 

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
Top Kudoed Authors