Problem with sum(select(and)))

i will two table,
table one called student contain student details
table two is a payment_log contains payment amount, which month they paid for, date and time.

i want to create a virtual column in table student which can calculate each studentโ€™s monthly pay amount, because some of them may pay two / three times.

so a select function with two filter is my thought to this. I tired to write the formula, but it doesnt workโ€ฆ

Sum(select(and(payment record[paymonth] = โ€œMarโ€ , payment record[payment], [name]=[_thisrow].[id])))

the error display that Cannot compare List with Text in (Payment record[Paymonth] = โ€œMarโ€)

anyone can help me?Thank you!

Solved Solved
0 14 1,319
1 ACCEPTED SOLUTION

finally i solved it!!! thank you everyone

sum(
select(
payment record[payment],
and ( [name] = [_thisrow].[id], in([paymonth], {โ€œMarโ€}))))

View solution in original post

14 REPLIES 14
Top Labels in this Space