Hello!
I would like to know if I can SUM up these two as one.
(SELECT(PARTICIPATION[Dosage],[Student ID]=[_THISROW].[Student ID]))
(SELECT(REFERRAL[Dosage],[Student ID]=[_THISROW].[Student ID]))
Please advise. Thank you.
Solved! Go to Solution.
You should be able to read it directly from related child virtual lists like…
SELECT([RelatedParticiptions][Dosage],TRUE)+SELECT([RelatedReferrals][Dosage],TRUE)
(SELECT(PARTICIPATION[Dosage],[Student ID]=[_THISROW].[Student ID])) + (SELECT(REFERRAL[Dosage],[Student ID]=[_THISROW].[Student ID]))
WOW! I have been trying with the AND () and I couldn’t make it work but you added a “+” and it works. Thank you.
You’re welcome @Kevin_Chan
Btw… do you have relationships between these tables?
@Aleksi Based on this, it looks like these two tables have relationships. Correct me if I’m wrong.
You should be able to read it directly from related child virtual lists like…
SELECT([RelatedParticiptions][Dosage],TRUE)+SELECT([RelatedReferrals][Dosage],TRUE)
@Aleksi, I tried your expression and yes it works. Thank you.
With that syntax you don’t need to read two tables totally. You only need to read the virtual related records list.
User | Count |
---|---|
41 | |
31 | |
31 | |
16 | |
14 |