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
Anonymous
Not applicable

Count IF less than for each category

Hi,

 

I have a set of data that is being used to track reviews meeting a 30 day deadline:

 

AsessorDays since last review
Asessor 120
Asessor 134
Asessor 1100
Asessor 15
Asessor 219
Asessor 210
Asessor 234
Asessor 228

 

I need to track how many learners are over the 30 days for each asessor, i have tried the below DAX statement but it doesnt seem to work:

 

Countless than = Calculate ( Count ('Table'[Asessor]), 'Table'[Days Since Last Review] <30

1 ACCEPTED SOLUTION

Try:

Less than 30 by row = 
CALCULATE(COUNT('Table'[Asessor]), FILTER('Table', 'Table'[Days since last review] < 30))

 

Over 30 days = 
CALCULATE(COUNT('Table'[Asessor]), FILTER('Table', 'Table'[Days since last review] > 30))

 

over 30.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

4 REPLIES 4
PaulDBrown
Community Champion
Community Champion

The following measure will return a count fo 1 for every row where the days <30:

Less than = CALCULATE(COUNT('Table'[Asessor]), FILTER('Table', SUM('Table'[Days since last review]) < 30))

result.png

 However, as you see this works for non - aggregated values; for aggregated values there are no "Asessor"s with a vlue under 30. Also, how do you wish to calculated the total?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

Hi!

 

Thank you for the swift reply.

 

Apologies i may have worded that poorly, i need to count how many of the asessors learners havent had a review in over 30 days, asessor 1 in this example has 2 learners over 30 days and asessor 2 has 1 over.

 

AsessorDays since last review Asessor# over 30
Asessor 120 asessor 12
Asessor 134 Asessor 21
Asessor 1100   
Asessor 15   
Asessor 219   
Asessor 210   
Asessor 234   
Asessor 228   

 

 

Try:

Less than 30 by row = 
CALCULATE(COUNT('Table'[Asessor]), FILTER('Table', 'Table'[Days since last review] < 30))

 

Over 30 days = 
CALCULATE(COUNT('Table'[Asessor]), FILTER('Table', 'Table'[Days since last review] > 30))

 

over 30.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






amitchandak
Super User
Super User

@Anonymous , Try like

 

Calculate ( Count ('Table'[Asessor]), filter('Table', 'Table'[Days Since Last Review] <30) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.