Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Relationship with Unique Value

I am trying to create a relationship between two tables. I have tried to do this and I have been receiving the error "cant create a relationship between these two columns because one of the columns must have unique values." I have removed duplicates in the query editor and I am still receiving this error. I have also tried to remove errors and neither seems to work.

 

Any suggestions??

  • Anonymous,

     

    Enclose 1 with double quotes (").

    Column =
    IF ( [Master Column] = "", "1", [Master Column] )
    

7 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    Anonymous

     

    1. are they all the same case?

    2. do you have any blank values?

     

    power query  sees different cases as unique values, dax doesn't.  hence remove duplicates no working

    also if there are blanks on the side that should be unique you need to pad them with a value like unknown or -1 or something similar.

    • Anonymous's avatar
      Anonymous
      Not applicable

      I have one row that contains a blank value, How would I go  about padding this with a 1? I have tried to just create a new column by using:

      =if([Master Column]="",1,[Master Column].

      With this I am recieving an "Expressions that yield a varient data-type cannot be used to define calculated columns" error. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      I have one row that contains a blank value, How would I go  about padding this with a 1? I have tried to just create a new column by using:

      =if([Master Column]="",1,[Master Column].

      With this I am recieving an "Expressions that yield a varient data-type cannot be used to define calculated columns" error. 

      • vanessafvg's avatar
        vanessafvg
        Community Champion

        Anonymous IF ( ISBLANK ( [Master Column] )1, [Master Column] )