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)) ) ) )
AmiraBedh
Super User
1 year agoI assume you have:
V_COURSES table: each row is a course with COURSEID
V_STUDENTS table: each row is a student enrolled in a course with a COURSEID and STUDENTINDEX
There is a relationship from V_COURSES[COURSEID] to V_STUDENTS[COURSEID] (1 to many).
You can create a measure like this:
Courses With No Enrollments =
CALCULATE(
COUNTROWS(V_COURSES),
NOT (V_COURSES[COURSEID] IN VALUES(V_STUDENTS[COURSEID]))
)
Or you can create a calculated column :
Has Enrollments? =
IF(
ISBLANK(CALCULATE(COUNTROWS(V_STUDENTS))),
"No",
"Yes"
)