sum select function not working

sum(select(Invoice[Amount],text(Supplier[Partner Virtual Column])=[_THISROW].[Name]))

I’d like to make a sumif of invoice amounts for every supplier in my table. I cant get this to work.

A table with invoices has a ref column referenced to suppliers table and in suppliers table i have a virtual column to sum amounts of all invoices from this supplier.

How can i get this to work?

This portion of your expression returns a list of values, which I imagine does not equal the single value probably returned by the following portion:

1 Like

try,

sum(select(Invoice[Amount], [Partner Virtual Column]=[_THISROW].[Name]))

2 Likes

This formula gives " can not compare Text to List" error. I figured it out already. The problem was in table names in formula. After removing table names formula work flawlesly.

3 Likes