13 Replies Latest reply: Oct 30, 2012 4:30 AM by Anita Manders RSS

    formula in pivottable based on subtotal

    Anita Manders



      hope one of you can help me with this


      I have a pivot table with


      articlecode          current stock          sales/month

      1341012S               `18                              43



               subtotal                                            112



      What i want is that current stock turns red if the average sales for 3 months (when you select 3 months) is more than current stock

      so: sum(sales)/3 > stock  than RED


      I have enclosed my document


      Example code 1341012S


      Current stock =18

      avv. for month july/aug/sept = 37,3333  (=112/3)


      stock should turn red, but it isn't


      when you only select month june (where sales is >18) than it is working, so it seems my formula only looks at the sales and not at subtotal sales


      Can someone help me??