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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vjnvinod
Impactful Individual
Impactful Individual

CountA Measure help

Hi

I am using a calendar table

with the below formula 

Date = CALENDAR(DATE(2021,07,03),DATE(2022,7,01))

 
and using a Dax to calculate the count of my Current HC, Note that Current HC is my table with GPN ID and other columns along with firm Joining date and I am using the below formula to calculate the count
Current HCount = COUNTA('Current HC'[GPN])
Now the issue I am facing is when selecting a range of dates using a slicer (let's say July to Dec), it gives me that count based on that selection by ignoring any data outside of the calendar
 
But I have Resources Joining date which is outside of the my calendar table (let's say they join in 2014, 2015, etc)
I need to Count them as well if my resources are outside of the calendar table so for example when I select the last 3 months in the slicer, it should count all the number of resources until the last 3 months (should include all previous years resources count)
 
 
vjnvinod_0-1644852729165.png

 

 
how do I fix the below formula to implement that?
Current HCount = COUNTA('Current HC'[GPN])
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @vjnvinod ,

 

Please try:

Measure = 
CALCULATE(COUNTROWS('Current HC'),FILTER('Current HC',[Date]<= MIN('Date'[Date])))

Eyelyn9_0-1645062600264.png

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @vjnvinod ,

 

Please try:

Measure = 
CALCULATE(COUNTROWS('Current HC'),FILTER('Current HC',[Date]<= MIN('Date'[Date])))

Eyelyn9_0-1645062600264.png

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.