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
valerieHaines
Frequent Visitor

Data Calculation/Aggrigation

Hello all,

 

I am trying to generate a report which determines chronic absence rates by school.  I have a table called StudentAttendance and in this table I have StudentID, CalendarDate, AttendCode, SchoolID, and a column called isAbsence which is 1 if the AttendCode is for an absence and is 0 for all other AttendCodes.

 

I managed to come up with a table visualization to display a student's number of absences, number of days enrolled, their absence rate and a column called isChronic which is 1 if the absence rate is greater than or equal to 10% and 0 otherwise.  All of this is dependant upon a date slicer because depending on the range provided in the slicer a student may or may not be chronically absent.  The definition of chronically absent is a student who is absent 10% or more of their enrolled attendance days.

 

I'm trying to take the above data and aggrigate it at the school level to determine the chronic absentee rate based on the school's population.  So for example, if for a particular slicer date range a school has a population of 100 students and during that range 4 students were defined as being chronically absent, then that school has a chronic absentee rate of 4%.

 

I'm having trouble trying to get the data to aggrigate properly up at the school level.  I was able to do it at the student level and I was hoping to take that student level aggrigate to calculate the building level, but it's not working.

 

 

Any ideas?

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @valerieHaines 

Sample data and expected output would help tremendously.

And I think you need to create the measure by "ALL" Function.

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

 

Please see this post regarding How to Get Your Question Answered Quickly:

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 


Best Regards,
Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.