cancel
Showing results for
Did you mean:
Frequent Visitor

## COUNTIF an aggregated Measure is below a threshold

Hi Everyone,

Apologies if this is actually really easy but whilst I know what I need to do, finding the DAX solution is proving tricky.

The scenario is I have numerous aggregated school attendance measures that give me an overall attendance figure that I can filter by various factors such as year group, gender, school etc. What I would like to do is take this calculation, calculate it inside a measure for all students row by row and return the number of students that are within certain bands; initially with students that are below 90% attendance.

As seen above, I can get this number by putting the measure in a table alongside the student name field or in this case a discreet identifier and applying a filter in the visual filters section. What I really want is a measure that returns just "31" so that I can then use that measure alongside time intelligence functions to track changes over time. I think this may involve utilising the COUNTIF function but I don't know the way to disaggregate the attendance measure to student level inside a measure prior to applying that. I would use a calculated column to provide the total attendance but I don't think that is the best way forward.

As a side note the attendance measure is drawn from an attendance table and takes the sum present sessions and then divides that by the sum possible sessions. Any suggestions would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Frequent Visitor

## Re: COUNTIF an aggregated Measure is below a threshold

This sounds similar to a problem I posted about today - the same solution I was given might work for you:

https://community.powerbi.com/t5/Desktop/DAX-Challenge-Count-of-Unique-ID-s-where-their-Sum-of-anoth...

2 REPLIES 2
Frequent Visitor

## Re: COUNTIF an aggregated Measure is below a threshold

This sounds similar to a problem I posted about today - the same solution I was given might work for you:

https://community.powerbi.com/t5/Desktop/DAX-Challenge-Count-of-Unique-ID-s-where-their-Sum-of-anoth...

Highlighted
Frequent Visitor

## Re: COUNTIF an aggregated Measure is below a threshold

Thanks cadalano that sorted it. As I thought it was as simple a soloution as a thought it would be but I wouldn't have figured it out without your help.

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 52 members 1,007 guests
Recent signins: