Forum Discussion

stribor45's avatar
stribor45
Post Prodigy
3 years ago
Solved

Date does not look the same

Can someone explain why this date doesn't look like three other dates even though I checked the type in the data view and it tells me that it is a date type. How can I fix this?

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi stribor45 ,

     

    I agree with vicky's reply. When you create a relationship between [Date] columns from two tables. For example, if your relationship is created from Fact table to Calendar table. Then the automatic date hierarchy will be removed from the related [Date] column in your Fact table.

    In my sample, you see I create a relationship from Table [Column 1] to Calendar[Date], then the hierarchy in Table [Column 1] will be removed. Then the hierarchy in other date columns in Fact table will be keeped.

    Due to Calendar is a calculated table based on data model, I couldn't create a relationship from it to fact table, or Power BI will return a circule error. You can try to create a relationship between two fact tables to have a test.

     

    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.

     

3 Replies

  • Do you have a relationship between a date table and the Date Requested field? The date heirarchy is removed from the many side when you do that - that is intended behaviour, as clarified here by someone at MS.

  • The image above shows the dates that are only in one table but this table is related to another table of dates I made using this tutorial Calendar Table.

    When I made the relationship between Calendar and the other table thats when that date become like that

     

    What I am trying to do is make a relationship between these two tables so i can use dates from Calendar table in my visuals.

     

    Hope that make sense

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi stribor45 ,

       

      I agree with vicky's reply. When you create a relationship between [Date] columns from two tables. For example, if your relationship is created from Fact table to Calendar table. Then the automatic date hierarchy will be removed from the related [Date] column in your Fact table.

      In my sample, you see I create a relationship from Table [Column 1] to Calendar[Date], then the hierarchy in Table [Column 1] will be removed. Then the hierarchy in other date columns in Fact table will be keeped.

      Due to Calendar is a calculated table based on data model, I couldn't create a relationship from it to fact table, or Power BI will return a circule error. You can try to create a relationship between two fact tables to have a test.

       

      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.