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
Allie
New Member

Filter issue with "<="

Hello,

 

I am trying to get a chart that will show me Headcount progress over time. I found a video with a nice solution to that, but for some reason it does not work exactly how I want.

This is the formula:

Headcount = Calculate(COUNTROWS('[HR Actions] Actions in EC'), FILTER(values('[HR Actions] Actions in EC'[Hire Date]), '[HR Actions] Actions in EC'[Hire Date] <= MAX( Dates[Date])), filter(values('[HR Actions] Actions in EC'[Term Date]), OR('[HR Actions] Actions in EC'[Term Date] >= MIN(Dates[Date]), isblank('[HR Actions] Actions in EC'[Term Date] ) ) ) )
 
My issue is that instead of counting everyone filtered with Hire Date before or on a given Date, it only filters and counts people hired precisely on the given date, meaning the sign "<=" seems not to be working properly...
 
Any ideas what might be the problem??
1 ACCEPTED SOLUTION
Payeras_BI
Solution Sage
Solution Sage

Hi Allie,

 

Make sure the relationship between these two dates ([Hire Date] & [Term Date]) and the [Date] from your Calendar Table is inactive.

 

Regards,

 

J. Payeras

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

View solution in original post

4 REPLIES 4
Payeras_BI
Solution Sage
Solution Sage

Hi Allie,

 

Make sure the relationship between these two dates ([Hire Date] & [Term Date]) and the [Date] from your Calendar Table is inactive.

 

Regards,

 

J. Payeras

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

Thank you 🙂

I was sure they were inactive, but went to check again and indeed relation to Hire Date was active for some reason...

Anonymous
Not applicable

Please, first learn about how to build correct models:

https://docs.microsoft.com/en-us/power-bi/guidance/star-schema

Then, try to learn about relationships in DAX:

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand

Then, try to learn about time-intelligence in DAX:

https://docs.microsoft.com/en-us/learn/modules/dax-power-bi-time-intelligence/

Then you'll be well equipped with knowledge to face issues like the one above.
themistoklis
Community Champion
Community Champion

@Allie 

 

Can you tell us more about your data model?

You use both Hire Date and Term Date in your formula

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.