4 Replies Latest reply: Oct 10, 2013 8:46 AM by Friedrich Hofmann RSS

    13 week average

      .

        • Re: 13 week average
          facundo de la cal

          YOU SHOUL DO IT WHIT THE CALENDAR DATE NOT SALES DATE

           

          HOPE THAT HELPS

          • Re: 13 week average
            Friedrich Hofmann

            Hi TimmyHop,

             

            I would suggest a two-step process:

            - Devise a way to assign a running number (1,2,3...) to the weeks that have sales - not to the ones without. Then you'll have a new field, say you call it "Week_w_Sales" (numeric).

            - You could then use set_analysis and tell QlikView to calculate the avg. of all those weeks_with_sales between the >week_with_sales 13 weeks ago< and the current week. Should look sth like this

             

            >>> avg({1<Week_with_sales = {"'>= $(=(Week(TODAY())-13))"}>} sales) <<<

             

            HTH

             

            Best regards,

             

            DataNibbler

              • Re: 13 week average

                Hi, thanks for your reply.

                i already have a chart expression  that seems to do exactly what i want..

                ..

                  • Re: 13 week average
                    Friedrich Hofmann

                    Hi TimyHop,

                     

                     

                    the script does not support set_analysis (what I proposed), but it should be possible to put your formula here into the script - just try it out, if the commands turn blue, they are supported and functional. You can then put this expression into your LOAD statement and you'll have an additional field that you can use i a diagram.

                     

                    Best regards,

                    DataNibbler