Sum of numbers by week

I have a table named period att that has 

Student ID  Date                Per1  Per2 Per3 Per4 Per5 Per6  Total P  Week Number

123456          8/11/2022           p        p       p       p       p                   5                   33

123456          8/12/2022          p        p       p       p                             4                  33

123456          8/15/2022          p        p       p       p        p                  5                   34

my code looks like this

sum

(select(period att[Period Present], [_thisrow].[Week Number] = [week number], true)

)

What I would like is a list that is like this

Give the total of P a student has by week number

The results are coming up as 15 when the answer should be 9 and im not sure where im going wrong, thank you in advance.

 

Solved Solved
0 1 122
1 ACCEPTED SOLUTION

Don't you also need to filter by student?

select(period att[Period Present], 
         AND([_thisrow].[Student ID] = [Student ID],
[_thisrow].[Week Number] = [week number])
)

 I hope this helps!

View solution in original post

1 REPLY 1

Don't you also need to filter by student?

select(period att[Period Present], 
         AND([_thisrow].[Student ID] = [Student ID],
[_thisrow].[Week Number] = [week number])
)

 I hope this helps!

Top Labels in this Space