Forum Discussion
dbollini
Helper II
1 year agoJoin Two Tables and Get the values
Hello All, SELECT @TotalTeamMemberCount = Count(DISTINCT tm.EmpId) FROM IPME_TeamMembers tm INNER JOIN IPME_Teams t on tm.TeamID = t.ID INNER JOIN RideOutEvents roe...
- 1 year ago
Are these three tables have relationships? i.e., from Teams to team members to ride out events, do they have relationships in place?
Then try this. (Try first without ALL and try with ALL - one should work. )
TotalTeamMemberCount = Calculate( DISTINCTCOUNT( IPME_TeamMembers[EmpId]), FILTER ( ALL('RideOutEvents'), RideOutEvents [RideOutEventID ] = @EventId ), -- Replace with your variable or value FILTER ( ALL('IPME_Teams'), IPME_Teams [SectionId] IN { 0, @SectionId)) -- Replace with your variable or value )
dbollini
Helper II
1 year agousers not Checkedin = CALCULATE(DISTINCTCOUNT(IPME_TeamMembers[EmpId]))-CALCULATE(DISTINCTCOUNT(ReportRideOutCheckInsView[Id]))
But this is not giving me correct counts