0 Replies Latest reply: Jun 19, 2015 6:29 AM by Inês Castelhano RSS

    Aggr function problem

    Inês Castelhano

      Hi guys,


      I am having trouble with the following expression, because it is returning zero and it shouldn't:


      =sum(aggr( (

      (sum( { < myYear=,myMonth=,myDay=, [End Date]=$(=vDataSel_min),[myDate]=$(=vDateSel) > } [End Date] ) )


      (min( {$} TOTAL



      My idea is to subtract the minimum of the selected date to the EndDate for each ID. Each ID has its own EndDate.


      I have already the following similar expression and it is working fine:



      max({$} TOTAL



      - (sum({<myYear=,myMonth=,myDay=, [myDate]=$(=vDateSel),[End Date]=$(=vDataSel_max)>}



      I don't understand why it is working for the second one and it is not working for the first one. There are no errors in the defined variables, I am using all of them in other objects.


      Thanks in advance,