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
PhilJuniper
Frequent Visitor

Filter activities in a period

I have a table, simplified as

  • Task Name
  • Task Start Date
  • Task Finish Date

I wish to be able to filter tasks that are active in a specified period, selected via two slicers (Period Start and Period End)

So the table when filtered would show tasks where:-

  • Task start is equal to or less than period end
  • AND
  • Task finish is equal to or greater than period start

How can i do this please?

4 REPLIES 4
PhilJuniper
Frequent Visitor

@v-xiaotang Can you take a look at my question in post #3 and #4 please?
PhilJuniper
Frequent Visitor

E.g. in the following example, i would want one slicer to select the period start, another to select the period end, and the result would be the table showing the green tasks.

 

Period filter dates.jpg

v-xiaotang
Community Support
Community Support

Hi @PhilJuniper 

Thanks for reaching out to us.

I suggest you use a slicer to get the date range, and if you want to use two slicers, you have to create two date tables.

(1) create the calendar table

vxiaotang_0-1665559807952.png

(2) create the measure,

filtermeasure = 
var _start=MINX(ALLSELECTED(CALNEDAR),[Date])
var _end= MAXX(ALLSELECTED(CALNEDAR),[Date])
return IF(MIN('Table'[Task Start Date])>=_start && MIN('Table'[Task Finish Date]) <=_end,1,0)

then put it into visual-level filter of your visual, set it to 1

vxiaotang_1-1665559897232.png

result

vxiaotang_2-1665559925854.png

 

 

Best Regards,

Community Support Team _Tang

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

Thanks for that. How do I define the period start date and period end date that i want to use? Note these are different to the task start and end dates.

So i want to define two dates, period start and period end.

I want the tasks to be filtered according to these period dates. E.g. in your table, if i chose period start 11th Feb, period end 11th March, i would then just see tasks D and E.

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.