2 Replies Latest reply on Mar 26, 2013 8:17 AM by Greg Araujo

    calculating min value based off a date range

    Greg Araujo

      Hi there,

       

      Based on a range of selected dates in my date range quick filter, I am trying to show the first value within the specified date range. In other words...

       

       

      report_typereport_monthnet_salesnew_net_sales
      actual01-Jan-2013$100,000.00$99,000.00
      actual01-Feb-2013$150,000.00$147,000.00
      actual01-Mar-2013$200,000.00$147,000.00
      actual01-Apr-2013$225,000.00$224,000.00
      forecast01-Jan-2013$250,000.00$217,500.00
      forecast01-Feb-2013$300,000.00$247,000.00
      forecast01-Mar-2013$350,000.00$339,500.00
      forecast01-Apr-2013$200,000.00$189,000.00

       

       

      If I select january through march, I would like to display the information as follows...

       


      actualforecast
      start_net_sales100,000250,000
      net_sales450,000900,000
      new_net_sales393,000804,000

       

      i tried creating a formula that used ATTR :

       

      iif (attr([report_month]) = window_min(min([report_month])), sum([net_sales]), 0)

       

      but that did not seem to give me the desired results.

       

      any help is appreciated.

       

      thanks,

       

      greg