Forum Discussion
Can't create a date hierarchy
Hello
As you can see i have two columns of date [DATE ENTREE] and [DATE SORTIE] underneath. I can create a hierarchy (year, trim, month, day) for the second one but note for the first one. I do not understand because formats are the same..
Hello
The problem came from a lack of relation between two tables.
Thank you for your help.
4 Replies
- MFelix
Super User
Hi PatrickByGecko ,
I'm assuming that looking to the image you have the Auto date/time intelligence turn on on your model so on a table the automatic hierarchy will only be created on one column that is present on the relationship.
On your case confirm if the column [DATE SORTIE] makes part of a one to many relationship with another table?
As you can see in the image below the column that as the hierarchy is the calendar date and not the ENTREE because it as the relationship active:
Regards,
MFelix
- PatrickByGecko
Helper V
You are right. The problem was coming from a relation ship.
But now I get problem when comparing dates (MM/YY) in the script underneath (I'm sure there is CDI at theses dates) and my counters return nothing. I suppose my comparison of date is wrong...?
- PatrickByGecko
Helper V
I found a solution to compare Dates using [MONTH] and [YEAR].
But a new problem occured.
As you can see for my counters (CDI NIORT for instance) some months are repeated instead of beeing cumulated (have a look at the very bottom of the screen "fevrier 2019". How can I explain that?