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?

 

 

0 3 84
3 REPLIES 3


@Primoz wrote:

Supplier[Partner Virtual Column]


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:


@Primoz wrote:

[_THISROW].[Name]


 

try,

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

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. 

Top Labels in this Space