Forum Discussion

ani_informa's avatar
ani_informa
Icon for Helper III rankHelper III
5 years ago

Relation between Date and Fact tabl

Hi

 

My Power BI desktop model contains one date dimension table (DimDate) and there are two fact tables (FactSales, FactTrans). There is relationship between DimDate table and 2 fact tables  (Many to One i.e. many in fact and one in dimension). when I am trying to pull measures from FactSales and FactTrans and Date from DImDate on axis to show trend, it is not showing any trend. So seems relation is not working. Both the measures are using simple SUM agg function. This looks strange because it is straight forward. Any help would be highly appreciated.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  ani_informa  ,

     

    In Dax, the date can be of the date or date/time type. You can check whether the data type in your table is one of these two, to prevent it from being a text type, confirm the date column in all your tables ,the data types are all the same.

     

    And if the data type of the date column in one table is "date", and the data type of the date field in the other table is "date/time", an error that does not work will occur.

     

    If my answer is not what you need, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

     

    Best Regards,

    Liu Yang

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