Forum Discussion
True/False indicator based on a measure?
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)
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.