Hi All
I need to sum amount paid where the payment date minus the highest date of three dates is less than 31.
I have an if statement which works to show me if an invoice has been paid within 30 days:
=if(APCheck.PaymentDate-RangeMax(APInv.InvoiceDate,Alt(APInv.InvoiceReceivedDate,0),Alt(APInv.GoodsReceivedDate,0))<31,'0-30 Days','31+ Days')
But I need to now try and sum invoice amount where the above is <31. Something like this:
=sum({<APCheck.PaymentDate - RangeMax(APInv.InvoiceDate,Alt(APInv.InvoiceReceivedDate,0),Alt(APInv.GoodsReceivedDate,0))<31 }>}[APInv.AmountPaid])
but it won't calculate. I think it's telling me either I can't use RangMax in set analysis or that I can't write set analysis very well
Any ideas?
Thanks in advance
Can you try this:
Sum(If(APCheck.PaymentDate-RangeMax(APInv.InvoiceDate, Alt(APInv.InvoiceReceivedDate,0), Alt(APInv.GoodsReceivedDate,0)) < 31, [APInv.AmountPaid]))
UPDATE: Missed a parenthesis at the end earlier.
Can you try this:
Sum(If(APCheck.PaymentDate-RangeMax(APInv.InvoiceDate, Alt(APInv.InvoiceReceivedDate,0), Alt(APInv.GoodsReceivedDate,0)) < 31, [APInv.AmountPaid]))
UPDATE: Missed a parenthesis at the end earlier.
You can use RangeMax in Set Analysis, Would you provide application to work around
OR Try this, Can you elaborate more what was the 31
=sum(If(APCheck.PaymentDate - RangeMax(APInv.InvoiceDate,Alt(APInv.InvoiceReceivedDate,0),Alt(APInv.GoodsReceivedDate,0))<31, [APInv.AmountPaid])
Thank you Sunny, this works