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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.