Forum Discussion

SamOvermars's avatar
SamOvermars
Helper I
3 years ago
Solved

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...
  • hnguy71's avatar
    3 years ago

    SamOvermars ,

     

    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