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
Sab
Helper V
Helper V

Countrows Outside date range in the slicer

Hello

 

I have a file with employees data along with the StartDate and the FinishDate of each emloyee. 

 

Now the requirement is to count rows where the StartDate is BEFORE min date of the slicer AND the FinishDate is AFTER  the max date of the slicer!!!

 

The slicer contains Date column from the date table wich is related to the fact table using StartDate, and also to EndDate (inactive relationship).

 

I created a measure but it always returns Blank:

 

HR_Sarah - Power BI Desktop.jpg

I believe the blank value is because the measure looks for the values outside the selected date range...

 

Thanks!

 

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Sab 

 

You need to use Filter in your calculate, try something like this:

 

Calculate([All rows], Filter(all(People Overview),People Overview[Start Date]<StartDate && People Overview[Finish Date]>EndDate))

 

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

Appreciate your Kudos!!

 

View solution in original post

1 REPLY 1
VahidDM
Super User
Super User

Hi @Sab 

 

You need to use Filter in your calculate, try something like this:

 

Calculate([All rows], Filter(all(People Overview),People Overview[Start Date]<StartDate && People Overview[Finish Date]>EndDate))

 

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

Appreciate your Kudos!!

 

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