cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StanleyBlack Frequent Visitor
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.

 

Persistent Absence Example.png

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.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
cadalano Frequent Visitor
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...

 

 

View solution in original post

2 REPLIES 2
cadalano Frequent Visitor
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...

 

 

View solution in original post

Highlighted
StanleyBlack Frequent Visitor
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.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

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

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

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.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

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

Users Online
Currently online: 52 members 1,007 guests
Please welcome our newest community members: