Forum Discussion

KushGupta123's avatar
KushGupta123
Frequent Visitor
3 years ago
Solved

Date Table not working

I created the data table using "List.Dates(#date(2022,1,1),365,#duration(1,0,0,0))". I connected the date table to the table I wanted to filter. Both of them have same data types and same date format. Still I am not able to filter out the data when I am using date field from the date table I created. What can be the issue here ?

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi KushGupta123 ,

     

    DimTable:

    FactTable1:

    FactTable2:

    relationships:

     

    1. Please check that each value in the date column of the fact table can be found in the dimension table.

     

    2. If the date column in the fact table is of type date/time and the time part is not 12:00:00AM, although the relationship is displayed normally, it cannot be filtered correctly.

    You might consider creating another column of dates in the fact table to connect to the dimension table.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

4 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion

    Difficult to say without having the pbix.

    Try putting the date field from both tables in a table and see if there are matches.

    --

    The relationship dialog will show you the count of matches (it states it at the the bottom of the screen) so check that first.

    You can investigate from there.

    • KushGupta123's avatar
      KushGupta123
      Frequent Visitor

      HotChilli I tried doing it by putting date from dim_date table and dttm from my fact table and got a strange view

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi KushGupta123 ,

         

        DimTable:

        FactTable1:

        FactTable2:

        relationships:

         

        1. Please check that each value in the date column of the fact table can be found in the dimension table.

         

        2. If the date column in the fact table is of type date/time and the time part is not 12:00:00AM, although the relationship is displayed normally, it cannot be filtered correctly.

        You might consider creating another column of dates in the fact table to connect to the dimension table.

         

        Best Regards,
        Gao

        Community Support Team

         

        If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

        How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

  • HotChilli's avatar
    HotChilli
    Community Champion

    And this shows you don't have matches.

    I don't really have time to go back and forth on this.  If you can investigate and progress this then, great, otherwise link your pbix and i'll have a look.