Forum Discussion
True/False indicator based on a measure?
| StudentID | Date | Attendance |
| 11111 | 1/1/2023 | Present |
| 11111 | 1/2/2023 | Present |
| 11111 | 1/3/2023 | Present |
| 11111 | 1/4/2023 | Present |
| 11111 | 1/5/2023 | Present |
| 22222 | 1/6/2023 | Present |
| 22222 | 1/7/2023 | Present |
| 22222 | 1/8/2023 | Present |
| 22222 | 1/9/2023 | Present |
| 22222 | 1/10/2023 | Absent |
| 33333 | 1/11/2023 | Present |
| 33333 | 1/12/2023 | Present |
| 33333 | 1/13/2023 | Absent |
| 33333 | 1/14/2023 | Absent |
| 33333 | 1/15/2023 | Absent |
I don't think I can attach a file, so here's how the data look. Thanks!
- Sahir_Maharaj3 years agoSuper User
Hello amberebee,
1. Total number of students (count unique StudentID):
Total number of students = DISTINCTCOUNT(table[StudentID])2. Total number of students chronically absent (count unique StudentID if AbsRate >= 0.10):
Total number of students chronically absent = CALCULATE( DISTINCTCOUNT(table[StudentID]), FILTER(ALL(table), [AbsRate] >= 0.10) )3. Percentage chronically absent (Total number of students chronically absent / Total number of students):
Percentage chronically absent = DIVIDE([Total number of students chronically absent], [Total number of students], 0)- amberebee3 years agoNew Member
Hi Sahir,
Thanks so much for engaging with my question! Here is the outcome when I create the three measures you provided. Each row represents a different school. The number of students column is correct. I'm still trying to figure out what's going on with the other 2 columns, but roughly speaking, the number of students chronically absent in a school should range from about 8-30% of the total number of students. There's something off about the context of the measures that I haven't figured out yet.
- amberebee3 years agoNew Member
I replicated your measures in Power BI using the simpler example dataset, and they worked. I'm going to expand the simple dataset to also include different schools to see if I can better replicate the issue in my larger dataset. Stay tuned.