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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

find records in between dates

Hi

 

I have two fields

From date

To date

 

I want to have a variable in my report so i can type in example year 2015 and the result will find all records where 2015 is between or on "from date" and "to date".

 

Thanks for help!

 

1 ACCEPTED SOLUTION
AlexAlberga727
Resolver II
Resolver II

There are a couple solutions to this issue.

 

You can go more of a dynamic route and allow the utilizations of both a YEAR and a DATE slicer. Allow users to set a year using radio buttons, then allow them to enter a date range using a date slicer. I would reccomend using a calendar table too if you're not.

 

You also can create static variable within measurs that could contains your Min and Max Dates for any calculation.

 

Let me know if you're interested in either, and would like some more infomation.

 

 

View solution in original post

4 REPLIES 4
AlexAlberga727
Resolver II
Resolver II

There are a couple solutions to this issue.

 

You can go more of a dynamic route and allow the utilizations of both a YEAR and a DATE slicer. Allow users to set a year using radio buttons, then allow them to enter a date range using a date slicer. I would reccomend using a calendar table too if you're not.

 

You also can create static variable within measurs that could contains your Min and Max Dates for any calculation.

 

Let me know if you're interested in either, and would like some more infomation.

 

 

Anonymous
Not applicable

hi

 

Thanks for your time and answer.

 

The issue is that the date ranges are not fixed (to and from date), so i cant use a slicer on to date and from date.

 

Examle:

I want all records in 2015

here to-date can be on 2015 or later and from date can be on 2015 or before

 

Please share more information 🙂

 

Thanks

To clarify -

 

You want to be displayed either "To Date" or "From Date", that contains 2015?

 

Sharing some examples of your data will be helpful.

Anonymous
Not applicable

Thanks. The answer was in your first post 🙂

 

I created to date filters. so to find all records for 2017 it will be: from date = 2017 and before and 2017 and beyond in the second

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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