10 Replies Latest reply: Dec 9, 2013 10:44 AM by Thomas Jensen RSS

    Set analysis expression...is this correct?

    Josetxo Josetxo Amonarriz



      In my task to calculate the overdue amounts of our customer's invoices and its point-in-time evolution, I have written two expressions.

      One of them is the Total Balance: SUM of the amounts of the invoices issued: no problems here:


      num(sum({<"Posting Date"={"<=$(=date(Max(DateID),'DD/MM/YYYY'))"}>} "Amount"),'#.##0' & ' €')



      But, if I want to SUM those amounts that belong to invoices not yet overdue (this is, the "DueDate" field is lowerthan the DateID field), this will always return ZERO:


      =num(sum({<"DueDate"={">(=date(DateID,'DD/MM/YYYY'))"}, "Posting Date"={"<=$(=date(Max(DateID),'DD/MM/YYYY'))"}>} "Amount"),'#.##0' & ' €')


      Is this an error on my expression (note that I am not using Max(DateID)), or this simply cannot be accomplished?


      Many thanks!