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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rachaelwalker
Resolver III
Resolver III

Date range filter based on dates between two date fields

I have two tables. Date Table and Schedule. They are related by 'Date'[Date] and "Schedule'[Date Scedule Start]. I also have an inactive relationship between 'Date'[Date] and 'Schedule'[Date Schedule End'. I am looking for a solution to filter my table visual by using 'Date'[Date] but I want it to return if Date Schedule Start OR Date Schedule End fall into the range selected. 

For example, in the screenshot below, if I select 'Date'[Date] 3/20/25 - 3/29/2025, I would like the highlight row to still be returned. 

 

rachaelwalker_1-1741814907700.png

Sample data:

Ticket #Date Schedule StartDate Schedule End
1795353/3/20253/7/2025
1812123/3/20253/7/2025
1812133/3/20253/7/2025
1838313/3/20253/7/2025
1838323/3/20253/7/2025
1838333/3/20253/7/2025
1857253/3/20253/7/2025
1857253/3/20253/28/2025
1857273/3/20253/7/2025
1873963/3/20253/7/2025
1877293/3/20253/7/2025
1878903/3/20253/7/2025
1965853/3/20253/7/2025
1965863/3/20253/7/2025
1969033/3/20253/7/2025
1975433/3/20253/7/2025
1976653/3/20253/4/2025
1978253/3/20253/3/2025
1978373/3/20253/4/2025
1849453/4/20253/7/2025
1849463/4/20253/7/2025
1849473/4/20253/7/2025
1968243/4/20253/5/2025
1968253/4/20253/5/2025
1838313/5/20253/5/2025
1978293/5/20253/6/2025
1978303/5/20253/6/2025
1980783/5/20253/5/2025
1838313/6/20253/6/2025
1544343/7/20253/7/2025
1969033/7/20253/7/2025
1981793/7/20253/7/2025
1685103/10/20253/14/2025
1795353/10/20253/12/2025
1838313/10/20253/14/2025
1838323/10/20253/14/2025
1838333/10/20253/14/2025
1849453/10/20253/14/2025
1849463/10/20253/14/2025
1849473/10/20253/14/2025
1857253/10/20253/10/2025
1857253/10/20253/14/2025
1857273/10/20253/14/2025
1873963/10/20253/14/2025
1877293/10/20253/12/2025
1878903/10/20253/14/2025
1893123/10/20253/14/2025
1893133/10/20253/14/2025
1902963/10/20253/14/2025
1922093/10/20253/14/2025
1945133/10/20253/14/2025
1945143/10/20253/14/2025
1946623/10/20253/14/2025
1965853/10/20253/10/2025
1971913/10/20253/14/2025
1972183/10/20253/14/2025
1980243/10/20253/14/2025
1980653/10/20253/12/2025
1980663/10/20253/12/2025
1980673/10/20253/12/2025
1982723/10/20253/11/2025
1982733/10/20253/11/2025
1983703/10/20253/12/2025
1983713/10/20253/12/2025
1983723/10/20253/10/2025
1983723/10/20253/12/2025
1838313/11/20253/11/2025
1946623/11/20253/11/2025
1983583/11/20253/14/2025
1838313/12/20253/12/2025
1902963/12/20253/12/2025
1945793/12/20253/12/2025
1945793/12/20253/13/2025
1945803/12/20253/13/2025
1945813/12/20253/14/2025
1971913/12/20253/12/2025
1979463/12/20253/14/2025
1983723/12/20253/12/2025
1876583/13/20253/19/2025
1931383/13/20253/14/2025
1931393/13/20253/14/2025
1931403/13/20253/14/2025
1965163/14/20253/14/2025
1685103/17/20253/21/2025
1857253/17/20253/21/2025
1857273/17/20253/21/2025
1865563/17/20253/21/2025
1865573/17/20253/21/2025
1876343/17/20253/21/2025
1887463/17/20253/21/2025
1900273/17/20253/21/2025
1900283/17/20253/21/2025
1900293/17/20253/21/2025
1929883/17/20253/21/2025
1952653/17/20253/21/2025
1971913/17/20253/21/2025
1973343/17/20253/17/2025
1974663/17/20253/21/2025
1978563/17/20253/21/2025
1980683/17/20253/21/2025
1971303/18/20253/18/2025
1971313/18/20253/18/2025
1945133/19/20253/19/2025
1876833/20/20253/25/2025
1968693/20/20253/21/2025
1968703/20/20253/21/2025
1968713/20/20253/21/2025
1685103/24/20253/28/2025
1857253/24/20253/28/2025
1857273/24/20253/28/2025
1859583/24/20253/28/2025
1859593/24/20253/28/2025
1859603/24/20253/28/2025
1865563/24/20253/28/2025
1865573/24/20253/28/2025
1876343/24/20253/28/2025
1900273/24/20253/28/2025
1900283/24/20253/28/2025
1900293/24/20253/28/2025
1905593/24/20253/28/2025
1905603/24/20253/28/2025
1906233/24/20253/28/2025
1906243/24/20253/28/2025
1913503/24/20253/28/2025
1913513/24/20253/28/2025
1913523/24/20253/28/2025
1929883/24/20253/28/2025
1936003/24/20253/28/2025
1944713/24/20253/28/2025
1944723/24/20253/28/2025
1952653/24/20253/28/2025
1915223/25/20253/28/2025
1915233/25/20253/28/2025
1915243/25/20253/28/2025
1951903/25/20253/26/2025
1877063/26/20253/31/2025
1969103/27/20253/27/2025
1969123/27/20253/27/2025

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar question in the attached file.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar question in the attached file.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I've applied everything to my file, but when adding the Calendar formula to my date table, it returns the error: 'A table of multiple values was supplied where a single value was expected.' My Date table is related to my data table, while yours is not. Should I create a separate Calendar table for this purpose, or is that not considered best practice? or is the error related to something else?

 

Also, your file is exactly how I want mine to function—thank you so much for providing it!

 

rachaelwalker_0-1741877449277.png

 

You are welcome.  Please follow exactly what i have done.  If there is no relationship in my file, then do not create it on yours.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I applied exactly what you have done and this works perfectly. Thank you so much!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Deku
Super User
Super User

Measure=

Var DateRange= values( date[date] )

Var rowsinrange =

Calculate(

Countrows( schedule ),

Removefilters( date )

Schedule[date schedule start] in DateRange || schedule[date schedule end] in DateRange

)

Return

If( Rowsinrange > 0, 1)

 

Add this to the visual filters in the filter pane and filter to is not blank

 


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.