2 Replies Latest reply: Aug 9, 2012 8:08 AM by Rafael Forchetti RSS

    Test row data before aggregation.

      Hi I need help with an issue, I'm struggling to find a solution for this :


      I need to test some values before being aggregated, like the example :


      This is my data :


      MonthName DateA

      Jan 201205-Jan-1210-Jan-1210001000
      Jan 201210-Jan-1210-Jan-12500300
      Feb 201210-Feb-1205-Feb-1220001500
      Feb 201210-Feb-1205-Feb-1230003000



      What I want to display :


      MonthName DateA
      Jan 201215001300300
      Feb 2012500045004500




      The Expression being:


      if(DateB <= DateA, ValueB, 0)


      The expression obviously doesn't work because the data was aggregated demanding me to aggregate the values, however, I can't see how I can filter the values before the aggregation, if I do :


      if(Min(DateB) <= Min(DateA), Sum(ValueB), 0)


      I'll get wrong data cause it will not compare the dates in the row, but rather all dates from the month, and either not filter any values or filter all, depending on the combination of max/min functions that I choose.


      Does anyone know how to make this ?


      I'd be grateful if you could post the solution, not the qvw, as I'm using a personal version and can't open other people's qvws.


      Thanks in advance.