6 Replies Latest reply: Dec 21, 2016 12:56 PM by Shahbaz Khan Mohammed RSS

    rolling Chart dimension

    Patrick routier



      I have a chart with a dimension 'By week'. this work properly if I choose weeks in my list box appropriated, but I would like to have the possibility to fix the number of the week... for example the Week to date + the 3 previous one.

      frankly speaking I don't know how I can do that.

      please, I need your help.

      thank you in advance.

        • Re: rolling Chart dimension
          Shahbaz Khan Mohammed

          Week to date + the 3 previous one?

          I'm not sure what you're asking, can you explain more in detail?

          May be screenshots of what you want/output?

            • Re: rolling Chart dimension
              Patrick routier

              Hello Aehman,

              in more easy words, how can we defined a period (Week, Month, ...) as dimension without using a list box.

              hoping that it's will more understandable for you ;-)

              below an example of chart and the number that I talking about are those in absciss.

              Thank you in advance for your help.

              chart example.JPG

                • Re: rolling Chart dimension
                  Shahbaz Khan Mohammed

                  I do not know if you want your chart to look like the image you've provided. If yes, then use

                  week(weekstart(YourDateField)) & '-' & WeekYear(TempDate)as [Week Year],
                      week(weekstart(YourDateField)) & '-' & Month(TempDate) as [Week Month],
                      weekDay(YourDateField) as [Week Day],

                  In your Master Calendar, specifically[Week Year] will give you 1-2016,2-2016,3-2016....Week-Year.

                  And use Week Year as Dimension.


                  And for WTD expression in front end

                  Sum({<Year=, Month=, Quarter=, Week=, DateField=, DateNum={">=$(=Num(WeekStart(Max(DateNum))))<=$(=Max(DateNum))"}>} YourDimensionHere)


                  To me your requirement is not still clear.


                  Week,Month,Year,Quarter,Rolling Month,Year or Quarter all can be created in Script.

                  You want rolling 3 weeks or rolling months or year?

                  I'm sorry this is what I've understood from your reply.. If you've a sample image of an output you looking for? And the above image is Stacked bar, which will use more than 1 expression.

              • Re: rolling Chart dimension
                Bruno Bertels



                In your bar chart


                Keep your dimension "By week"


                then as mesure somthink like this to adapt depending of the name of your field


                sum({$<[By week]={'>=$(=week(today())-4)<$(=week(today()))'}>}Sales)


                it will give you from the current week the last 4 weeks available


                hope it helps