Help with a sum / filter formula that uses .thisrow

I’m using this formula:
Payments.Filter(Project = thisRow.Project).[Payment Amount].Sum()
When I manually type in the the Project, the formula works fine
(ex: Payments.Filter(Project = ProjectA).[Payment Amount].Sum()

But when I keep “thisRow.Project” in the formula, the result is zero, no matter the project. The projects in the Payments table are lookups to the project in the table I’m using the formula in, so I’m sure the fields match. Any advice?

Hello @Allison_Usavage! Welcome to the community!
My best guess given the info is that you are trying to calculate the payments inside the projects table?
In this case, instead of using ThisRow.Project just use just ThisRow.
The reason for it not working is that ThisRow.Project returns a text value, and the Payments.Project is a row, so you are comparing different types of values.
I hope this helps

1 Like

Thank you so much! This makes sense and worked! Sometimes I’ve just spent too much time on a formula that I can’t see simple things like this.

1 Like

:blush: that’s great!

It happens to the best of us! :wink:

1 Like

Another thing that can sometimes help when trying to avoid these sorts of confusions in formulas is if you choose really meaningful column names.

For example, if you had instead named that column “Name” instead of “Project” you may have found that it was easier to recognize the mistake!

2 Likes