Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
poojask123
Partner - Creator
Partner - Creator

Adding Set Analysis to Sum(aggr())

Hi,

I have the below expression to calculate a weightage.

=NUM(SUM(((aggr(avg(num([Check Date])-num([Invoice Date])),[KEY_CompanyInvoiceNumberVendorNum]))*[Invoice $]))/

(Sum(IF(aggr(([Check Amount]),[Check Number])>0, aggr(([Check Amount]),[Check Number]),Aggr(sum([Gross Amount]),[Check Number])))),'#,##0')

This expression should be modified to add a set analysis like below, into the above expression:

{<Check_Date = {'>= $(vYearStart) <= $(vYearEnd)'}>}

Please help.

Thanks

Pooja

1 Reply
Anonymous
Not applicable

Within the first sum:

=NUM(SUM({<Check_Date = {'>= $(vYearStart) <= $(vYearEnd)'}>} ((aggr(avg(num([Check Date])-num([Invoice Date])),[KEY_CompanyInvoiceNumberVendorNum]))*[Invoice $]))/

(Sum(IF(aggr(([Check Amount]),[Check Number])>0, aggr(([Check Amount]),[Check Number]),Aggr(sum([Gross Amount]),[Check Number])))),'#,##0')