2 Replies Latest reply: Dec 5, 2013 8:47 AM by Friedrich Hofmann RSS

    Dimensional scope problem

    Friedrich Hofmann



      I am m.o.l. continually struggling with the fact that, in the charts where I have "day" as dimension, I want six days (Mo-Sat) to be displayed, whether there is data for a given day or not, and, if possible, independent of any non_time user_selections (e.g. if the user selects one plant out of several, the timeframe remains unchanged and I would still want six days to be displayed


      <=> It seems (I can't test it, I see it for the first time today) that in some charts where I have a selection_field "plant" although the user cannot actually select as the data is available for only one plant,

      => as long as there is no selection, six dimension_points (days) are displayed all right, but as soon as the user selects that plant, only the days up to "today" are in the chart.

      => The same thing happens when the user makes any other selections (there are some selection_fields where the user CAN actually choose)


      => Is there any way I can block that dynamism and just keep the chart static insofar as there shall always be six dimension_points (days) in the chart as long as the user does not select any of the time_fields (year/month/week/day)?


      Thanks a lot!

      Best regards,



        • Re: Dimensional scope problem
          Angela Echeverri

          Try using a master calendar like this one


          LET vDateMax = Floor(MonthEnd(Today()));

          LET vDateToday = Num(Today());





            $(vDateMin) + RowNo() - 1 as DateNumber,

            Date($(vDateMin) + RowNo() - 1) as TempDate

            AUTOGENERATE 1

            WHILE $(vDateMin)+IterNo()-1<= $(vDateMax);




          LOAD Distinct

            AutoNumber(Date(TempDate, 'DD.MMM.YY')) as Key.Date,

            AutoNumber(TempDate, 'PeriodID') as KeyV.PeriodID,

            AutoNumber(QuarterName(TempDate)) as KeyV.QuarterID,

            Date(MakeDate(Year(TempDate), Num(Month(TempDate)), 1), 'MMM.YY') as Period,


            Date(TempDate, 'DD.MMM.YY') as Date,

            Day(TempDate) as Day,

            Month(TempDate) as Month,

            Year(TempDate) as Year,

            QuarterName(TempDate) as Quarter,

            WeekDay(TempDate) as Weekday,

            QuarterName(TempDate)&' '&Ceil(Month(TempDate)/3) as Quarter_Short


          RESIDENT Temp_Calendario

          where WeekDay(TempDate) <> 'Sun'

          ORDER BY TempDate ASC;

          DROP TABLE Temp_Calendario;



          LET vDateMin = Num(MakeDate(2011,1,1));

          LET vDateMax = Floor(YearEnd(AddMonths(Today(), 12)));

          LET vDateToday = Num(Today());

            • Re: Dimensional scope problem
              Friedrich Hofmann

              Hi Angela,


              I have a master_calendar - that was one of the first things we implemented. In all the apps in use here - currently maybe around 40 - there is a master_calendar (identical, from a central qvs file).

              I use the date_field %Date to link all data_tables to this and I always have the same expression for the dimension "day" (in a variable).

              That does work fine - but only as long as there are no - well, no, that's not entirely true:

              => In most charts, I have an automatic selection of the current_year and the current_week, that seems to do no harm - such is my default_setting and there I have six days on display.

              I will have to do some more testing to find out just what exactly causes the dimension to "shrink".


              Best regards,