Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
irmantas
Contributor III
Contributor III

Aggr sum expression issue

Hello,

I need Aggregate SUM from different tables. Like this simple ex:

Sample1.JPG

I was use Aggr(sum(Purch),CustId=VendId) but expression do not works. Please help me.

Labels (1)
1 Solution

Accepted Solutions
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Try this:

Aggr(sum(if(CustId=VendId and DUEDATE<=Today(),Purch)),CustId)

 

 

View solution in original post

5 Replies
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Try:
Aggr(sum(if(CustId=VendId,Purch)),CustId)
irmantas
Contributor III
Contributor III
Author

Seems right, but in my real expression do not works.

irmantas
Contributor III
Contributor III
Author

In my real situation, SUM  have some IF's.

SUM(Purch) in really is: sum(if(DUEDATE<=Today(),Purch))

How i must change your expression to be correct?

Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Try this:

Aggr(sum(if(CustId=VendId and DUEDATE<=Today(),Purch)),CustId)

 

 

irmantas
Contributor III
Contributor III
Author

March better:) Expression works:)