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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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