Forum Discussion

FCF's avatar
FCF
Helper IV
6 years ago

table relationships

hi  i am wanting to have a relationship between two tables that are not directly conncected. i have created a common column  in both tables called Key3 but cannot get the expected results.

 

when  trying to use data  from the combined tables i get the following  error

 

the confusing  part is that  i can pull some data from the posted sales table and the target tabel  in  the report

5 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    FCF - Where are you trying to create that? Is it a column or a measure? You might try RELATEDTABLE.

    • FCF's avatar
      FCF
      Helper IV

      hi Greg

      this is what i get and clearly the values are incorrect

       

      Baed on the first line of this the table.

      I would  expect to see  the Sales_Var colum to show a  differnece of Sales(DBN$) 1105.60-Target Sales(CDN$) 1088.94= Sales_Var16.66.

    • FCF's avatar
      FCF
      Helper IV

       

      Hi Greg thanks for the suggestion but i am still not getting the correct values

       

       

      Baed on the first line of this the table.

      I would  expect to see  the Sales_Var colum to show a  differnece of Sales(DBN$) 1105.60-Target Sales(CDN$) 1088.94= Sales_Var16.66.

       

      • v-kelly-msft's avatar
        v-kelly-msft
        Community Support

        Hi  FCF ,

         

        The RELATED function requires that a relationship exists between the current table and the table with related information. You specify the column that contains the data that you want, and the function follows an existing many-to-one relationship to fetch the value from the specified column in the related table.

        That is the reason why you get an error in your first post.

        Check the reference below:

        https://docs.microsoft.com/en-us/power-bi/guidance/relationships-many-to-many

         

        Best Regards,
        Kelly
        Did I answer your question? Mark my post as a solution!
    • FCF's avatar
      FCF
      Helper IV

      Hi

      No, i have not been able to get the tables to have a full relationship. this is causing the vales presented to be questionalble.

      Regards