2 Replies Latest reply: Apr 23, 2013 4:35 AM by Bruno Santos RSS

    Set analysis Multiple calendars

    Bruno Santos

      Hello to everybody.

      I have a question. What is the difference between the following two expressions. I thought in my "inexperience" that the values should be equal but they are not.

      It's because, I need to have a MasterCalendar table with three Calendar types, and want to force the user to select a type.

      I need your help to understand what is happening.

       

      Many Thanks

      Bruno

       

      Expression1

      =Sum({$<MonthID = {"<=$(=Max(MonthID))"},
      CalendarType={"Fiscal"},
      Date = {"<=$(=Max(Date))"},
      Year = {$(=Max(Year))},
      Week = ,
      Quarter = ,
      Period = ,
      [Period (#)] = ,
      Month = >}[#Turnover EUR])
      

      Expression2:

      =Sum({$<MonthID = {"<=$(=Max(MonthID))"},
      Date = {"<=$(=Max(Date))"},
      Year = {$(=Max(Year))},
      Week = ,
      Quarter = ,
      Period = ,
      [Period (#)] = ,
      Month = >*<CalendarType={"Fiscal"}>}[#Turnover EUR]) 
      
      
        • Re: Set analysis doubt
          Nilesh Gangurde

          hiii ,

           

           

          your first expression will give you the correct data.

           

          as in the second one you have used the "*". i dont understood the use of "*" with calender type.

           

          also if you want to give facility to user to select the Calender type. then create the data island for the calender type and link it to the variable.

           

          -Nilesh

            • Re: Set analysis doubt
              Bruno Santos

              Hi Nilesh,

              Thanks by your help.

               

              The use of the "*" in the second term intends to intersect with the lines of the "calendar table", in which CalendarType= "Fiscal".

               

              My first expression doesn't return the correct data, because the Max(MonthID) for same year in calendartype="Fiscal" isn't same of other calendar type (eg: Gregorian).

               

              I've three calendars in the same table, with a identifier which is CalendarType.

               

              My intention is to pass the calendar type as an variable, but for now i'm only testing values.

               

              I 'll apreciate your help.