Forum Discussion

jch's avatar
jch
Microsoft Employee
5 years ago
Solved

Can't determine relationship between fields

I have 2 tables:

1. Table readin contains a calculated field :

Actual Date = if(SEARCH("/",readin[Actual], 1, -1) > 1,DATEVALUE(readin[Actual]))
2. Table DimDate contains a date and associated categorical variables for charting. I also created this column:
DateKey = datevalue(DimDate[Date])

How come adding a relationship between these 2 fields throws the error Can't determine relationships between the fields?
 

Thanks in advance

  • jch's avatar
    jch
    5 years ago

    I appreciate your help on this. The answer ended up being

     

    In a one-to-many relationship, you can only filter the relationship by table like table2, but not vice versa.

5 Replies

  • Hey  jch ,

     

    create a pbix file that contains sample data, but still reflects your data model. Upload the pbix to onedrive or dropbox and share the link. If you are using Excel to create the sample data, share the xlsx as well.

     

    Regards,

    Tom

  • jch what TomMartens  suggested, but why you are adding DateKey column in Calendar table? What is the type of both the columns? Is it date?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi jch ,

     

    You are trying to use two or more fields from tables that are not related. You need to remove the unrelated fields from the visual and then create a relationship between the tables. Once you have done this change, you can add the fields back to the visual.

     

    Refer to: 

    Create and manage relationships in Power BI Desktop 

    https://community.powerbi.com/t5/Desktop/Error-Can-t-determine-relationship-between-fields/m-p/908488

     

    Best Regards,
    Eyelyn Qin
    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 jch ,

     

    Could you tell me if my post helps you a little? If it is, kindly Accept it as the solution to make the thread closed. More people will benefit from it.

     

    Or please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

     

    Best Regards,
    Eyelyn Qin

    • jch's avatar
      jch
      Microsoft Employee

      I appreciate your help on this. The answer ended up being

       

      In a one-to-many relationship, you can only filter the relationship by table like table2, but not vice versa.