Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

RELATED function not pulling all values

I have a two identitical data set that have ID numbers that are reoccuring in the data sets. I have used the CONCATENATE function to bind this value together with another code that creates a unique row in the respective data sets. These concatenated values are then bound by a ONE:ONE relationship

 

I would like to pull the related ID number from one of the data set to the other but the RELATED function only solves it for one of the values and leaves the other blank, even if both concatenated values have a direct equivalent in the other data set.

 

Would appreciate an explanation as to why this is happening and a suggestion how to return the respective ID No to all my rows. 

 

See example below:

 

ID NO       ID CODE       CONCATENATED      RELATEDVALUE (pulled from other table)

123            A                    123A                         123

123            B                     123B                         (BLANK, but I want it to pull 123)

 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Thanks for your reply. 

     

    I resolved the matter by creating a DIM table without active relationship and using USERELATIONSHIP instead

6 Replies

  • mwegener's avatar
    mwegener
    Most Valuable Professional

    Hi Anonymous ,

     

    could you post a sample PBIX.

     

    If I answered your question, please mark my post as solution, this will also help others.

    Please give Kudos for support.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks, I figured out why it's causing problem and it's apparently because one of the text strings I concatenated changed between the data sets.

       

      Here is an example file. In this file I have shown a table of what I want to do. I want to create a table that recognizes ID NO for both data sets. I've considered creating a DIM table with ID NO, but because my original CONCATENATED relationship is both directions, Power BI won't let me create it. 

       

      https://www.dropbox.com/sh/0tl077ucen96782/AAAr44nW5j0tUASkQIQX23Z5a?dl=0

       

       

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

        Hi Anonymous ,

         

        Based on your shared sample pbix file, The "CONCATENATED text string for 1:1 Relationship" Column does not have the same value, for example "15-1-19-1" and "15-3-19-1" , although the two tables has a One-One relationship, but it only connect the rows which have same value in CONCATENATED column.

         

        Have you tried to create a M:M relationship between two tables based on the "ID NO" column? Could you please  show the exact expected result based on the Tables that you have shared.


        Best regards,