Forum Discussion
GON76
Helper III
1 year agoCounting Blank Fields on a Column that's Counting Values
A little background: I'm trying to count blank fields for a column which is displaying a count of values, the valued that I'm seeing on the card is (blank). I'm working in a learning environm...
- 1 year ago
You are right ! I forgot the FILTER it should be like below :
No Enrollments := CALCULATE( COUNTROWS(V_SECTIONCUSTOMFIELDS), FILTER( V_SECTIONCUSTOMFIELDS, ISBLANK( CALCULATE(COUNTROWS(V_ENROLLMENTS)) ) ) )
Alex_Sawdo
Resolver II
1 year agoBuilding a calulation to find what doesn't exist really depends on how your data model is built. If possible, can you share an image/explain the relationships that exist between your tables?
Optimally, you'd want to have:
- A courses table
- A students table
- A student-courses table (which students are enrolled in which courses)
With those three tables, you'd write a calculation kind of like this:
Measure =
CALCULATE(
COUNTROWS(
FILTER(
{{COURSES_TABLE}},
CALCULATE(
COUNTROWS(
{{STUDENT_ENROLLEMENTS}}
)
) = 0
)
)
)GON76
Helper III
1 year agoSorry, I gave the wrong table name... it's actually V_ENROLLMENTS and it captures all students who are enrolled within a courses via the STUDENTINDEX variable. Here are a few screenshots. FYI, I renamed V_ENROLLMENTS[STUDENTINDEX] to just "Enrollments" on my table visual.
Thanks so much for your help!
- AmiraBedh1 year ago
Super User
Try the following :
Sections With No Enrollments = CALCULATE( COUNTROWS(V_SECTIONCUSTOMFIELDS), ISBLANK(CALCULATE(COUNTROWS(V_ENROLLMENTS))) )