2 Replies Latest reply on Jan 8, 2013 10:16 PM by Yigang Chen

    calculated fields to be subject to different ranges of date filter

    Yigang Chen

      Hi,

      I am facing a situation where I have two calculated fields, both are controlled by the same date filter but need to be subject to different ranges.

       

      To simply the matter, let's say the data source is a database table of two months sales, [sales_date, number_item_sold].

       

      I am to display percentages of monthly sales, i.e., (monthly sale) / (total sale)

       

      I created two calculated fields, monthly_sale to sum sales within month, and total_sale to sum sales over the two months. However, the formula of both fields is the same SUM([number_item_sold]),if I put sales_date in the Filters shelf, both [monthly_sale] and [total_sale] are subject to the same date range and return the same value.

       

      Is there a way to calculate total_sale over the entire sales date range while calculating monthly_sale within months as filtered by sales_date?

       

      Best regards,