5 Replies Latest reply: Mar 29, 2011 9:38 AM by pscorca69 RSS

    Hierarchy Year-Month


      I need to create a hierarchy Year-Month. I have as a source a Time table, with data, year, month, day, etc.

      I load the distinct values for years and months and then I put these values in two different list boxes.

      I want when I click on a certain year all months having the selected year are selected, but I don't have this behaviour.

      Where do I mistake? Any helps to me, pleae? Thanks

        • Hierarchy Year-Month
          Jonathan Dienst


          Is there a specific reason that you want to do this, as I suspect that the model will behave as you expect without this effect?

          When you click on a year, the months for which no data exists for that year are automatically excluded, and shown in the month list box with gray background. The "possible" values show with white background.

          Selecting these months should make no difference to the model objects, except to change the "possible values" background to green.


            • Hierarchy Year-Month


              I have tried this behaviour but not occurs.

              I have a Time table in SQL Server with some fields like Date (the primary key), Year, Month, Day, etc. In this way, for a specific year I have certainly 12 months. I have read and stored my Time table into a QVD and then I load from the QVD selecting distinct values for year and month (I remember that Date is the PK of my Time table). Then I put the Year field into a list box and the Month field into another list box. Now, when I select a certain Year no any months is selected (in green).


            • Hierarchy Year-Month
              Miguel Angel Baeyens de Arce


              How are you loading your date field and calendar? Something like the following should work


              Date, Year(Date) AS Year, Date(Date, 'YYYY-MM') AS YearMonth, ...

              Hope that helps.