2 Replies Latest reply: Feb 6, 2016 10:13 AM by Onno van Knotsenburg RSS

    Calendar Hierarchy in Script

    A v

      Hi people,

       

      I've a dimension calendar and I want to add the following hierarchy -> Year -> Month -> Day

       

      I'm trying with the following code (I don't want a hierarchy group):

       

      Calendar:

       

           Hierarchy(YEAR, QUARTER, MONTH, DAY)

       

           LOAD [DATE]

                      ,[YEAR]

                      ,[MONTH]

                     ,[DAY]

                             ...(qvd);

       

      But when I reload the script I'm getting an error saying that the fielda namea must be unique inside the table.

       

      Anyone already get this error?

        • Re: Calendar Hierarchy in Script
          Onno van Knotsenburg

          I am guessing you want to build a Drill Down group (or dimension if you like).

          To do so, go into your Document Settings, find the Groups tab and create the group there.

           

          The hierarchy function is used to extract a hierarchy from a table where the table is referring to itself, like where you have an EmployeeID and a ManagerID and the ManagerID is in fact also an EmployeeID.

          • Re: Calendar Hierarchy in Script
            Sunny Talwar

            Not sure why you need a hierarchy in the script? Can you elaborate the reasoning?

             

            Like Onno pointed out, you can create a drill down group to probably do what you are trying to do.