6 Replies Latest reply: Mar 5, 2014 9:44 AM by Fabrice Aunez RSS

    Year Month Day Hiearchy

      Hi,

       

      If I have a datefield which datetype is YYYY-MM-DD.

       

      And i have These fields:

       

      Year(DateField) as Year

      Month(DateField) as Month

      Day(DateField) as Day

       

      How can i then make a hiearchy in a listbox ? Where i can select all attributes?

        • Re: Year Month Day Hiearchy

          Hi Thomas,

           

          two ideas for this:

          a) create an expression within listbox (instead of one single field):

          =Year & '/' & Month & '/' & Tag

          and check "View in treeview"

           

          b) create a according Drill Down Group with Year, Month, .... (see document propers --> group Tab ...)

          After creation use it in the listbox

           

          HtH

          Roland

          • Re: Year Month Day Hiearchy
            Byron Van Wyk

            Create a string that will look like this as an example

             

            DateHierarchy

            2014|January|01

            2014|January|02

            2014|January|03

            2014|January|04

            2014|January|05

            2014|February|10

            2014|February|11

             

            and in your list box click the 'show as tree view' with pipe as your delimiter, '|'

             

            to create the string simply do Year(DateField)&'|'&Month(DateField)&'|'&Day(DateField)

             

             

            Cheers,

            Byron

            • Re: Year Month Day Hiearchy

              Thomas,

               

              You can do something quite simple:

               

              Time2:
              Noconcatenate
              LOAD Date, Year & '|' & MonthName(Date) & '|' & Date as Path
              Resident Time;
              LOAD Date, Year & '|' & MonthName(Date) as Path
              Resident Time;
              LOAD Date, Year as Path
              Resident Time;

               

              Where Time is a first table with some dates, months and year fields, as you have.

               

              By creating a second table, you will multiply the lines between Path (pls rename it) and the dates. So that you can choose a year and get data in your chart.

              In the listbox, choose the Path field, and choose the delimiter (here the pipe) to get a treeview

               

              Fabrice