Forum Discussion
SamOvermars
3 years agoHelper I
How can I get a count that involves two tables?
Hello, I cant find a way to get this to work but it sounds simple. I have the following tables. AttendedTable AbsentTable AllUsersTable - Which contains the users and t...
- 3 years ago
Try this:
VAR _UserSection = CALCULATE(COUNTROWS(AllUsers), FILTER(AllUsers, AllUsers[UserSection] = [Section])) VAR _UserAttended = CALCULATE(SUM(Attended[Attendee]), FILTER(Attended, Absent[SectionKey] = Attended[SectionKey])) RETURN _UserSection - _UserAttended
hnguy71
3 years agoSuper User
Try this:
VAR _UserSection = CALCULATE(COUNTROWS(AllUsers), FILTER(AllUsers, AllUsers[UserSection] = [Section]))
VAR _UserAttended = CALCULATE(SUM(Attended[Attendee]), FILTER(Attended, Absent[SectionKey] = Attended[SectionKey]))
RETURN
_UserSection - _UserAttended