13 Replies Latest reply: Apr 30, 2014 5:02 AM by Manish Kachhia RSS

    Problem set analyses week vs week in crosstable

      Hi,

       

      I'm having some trouble getting my Set Analyses formula to work.

      Please review the table below:

       

      ProductYearWeek2014.wk32014.wk42014.wk52014.wk5
      Product AStartstock50000400003000025000
      Endstock40000300002500015000
      Product BStartstock5000400030002500
      Endstock4000300025001500
      Product CStartstock25000200001500012500
      Endstock2000015000125007500
      TOTALStartstock80000640004800040000
      Endstock64000480004000024000

       

      Please consider that my date table has a numeric sequence available for weeknumbers:

      YearWeek%SEQ_DATUM_YWSALES
      2014.wk254
      2014.wk355
      2014.wk456
      2014.wk557
      2014.wk658

       

       

      StartstockSUM( STOCK ) [This Works]
      EndstockSUM({<%SEQ_DATUM_YWSALES={$(=Max(%SEQ_DATUM_YWSALES)+1)}>}[STOCK]) [Does not work]

       

      Startstock: Should show this weeks startstock (=stock)

      Endstock: Should show next weeks startstock

       

      What am I doing wrong?

      Using Before(Stock) won't work properly, when only a few weeks are selected.

       

      Thanks.

       

      Minor tweak about what a formula should say

       

      Het bericht is bewerkt door: Mark Added example file