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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
georgedeakin51
Frequent Visitor

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.






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

@georgedeakin51 , Try like

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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