Forum Discussion

AlexMunday's avatar
AlexMunday
Frequent Visitor
5 years ago

Date hierarchy not detected when using a date table

Hi,

 

I am trying to use a date table in my model and as soon as I do so the date hierachy from the date table is gone.

I have the two table Pbi.date and Date that are exact copy.

 

If I don't use date a date table I am not able to filter the SalesOrderMaterial table, which also seems strange 😕  

 

Can someone tell me what I am doing wrong?

 

best,

 

Alex

3 Replies

  • AlexMunday , in Date table, when we mark it as the date table. Date becomes key and no more support hierarchy. You can add a new date column, which can have hierarchy. Or create one with different columns

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi AlexMunday 

    I think you use Apply auto date/time in Power BI Desktop.

    Date table is the "one" side of a model, so Date hierachy in Data table shouldn't disappear.

    Do you mean that Date hierachy in SalesOrderMaterial table is gone?

    For reference:

    When the option is enabled, Power BI Desktop creates a hidden auto date/time table for each date column, providing all of the following conditions are true:

    • The table storage mode is Import
    • The column data type is date or date/time
    • The column isn't the "many" side of a model relationship

    My Test:

    Here I can see date hierachy in Date table.

    Or you can try to build some calculated column by Year,Month,Day function. And build date hierachy by these calculated columns.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi AlexMunday 

    Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

     

    Best Regards,

    Rico Zhou