Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Hierarchy Year-Month

Hi.

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

5 Replies
MVP
MVP

Hierarchy Year-Month

Hi

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.

Jonathan

Highlighted
MVP
MVP

Hierarchy Year-Month

Hello,

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.

Not applicable

Hierarchy Year-Month

Hi.

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).

Thanks

MVP
MVP

Hierarchy Year-Month

I dont really understand the process in your post, so I suggest that you post your model (or a sample) with the load script. It could be that your data model is wrong as it seems that the month and year are not linked.

Jonathan

Not applicable

Hierarchy Year-Month

Ok Jonathan, I have verified successfully the behaviour that you say. Thanks