Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
kintela
Helper II
Helper II

Problem creating a relationship

Hi

I have this Calculated Table

captura.jpg

Where te column "ubicacion" has unique values but when I try to create a relationship between Ubicaciones.ubicacion and Proyectos.ubicacion says this

 

captura.jpg

 

Any idea Please???

 

regards

 

1 ACCEPTED SOLUTION

Hi @v-huizhn-msft and @Birdjo

 

At the end with FILTER i have eliminated the blank records

 

captura.jpg

 

Thanks

View solution in original post

6 REPLIES 6
Birdjo
Resolver II
Resolver II

You can make a table with unique values of "ubicacion" with that method:

1. See which table contains all values for "ubicacion"

2. Duplicate that table

3. Delete all columns except "ubicacion"

4. Remove duplicates

5. Make your relationships

v-huizhn-msft
Employee
Employee

Hi @kintela,

In order to create a relationship in between these two columns in Power BI, at least one side of the relationship must be tied to a column that is unique in the table. Please verify a column in one side is unique. From your screenshot, there are blank values in table, if you have mutiple blank rows, there are unable to create relationship.

 

For instance, the following table RE1 and RE2, there are mutiple blank values, so we get error when create relationship. Please the the screenshot.

1.PNG 2.PNG 3.png

Click resource table->Edit Query, select the column->right click->remove duplicates, you will get unique values in table.

4.PNG 6.PNG

So please check and remove duplicates in your resource table using Edit Query, and try to create relationship to verify if the error still exists.

Best Regards,
Angelia

Hi

The problem is that ALL Function always add a blank record. In my table Ubicaciones the column Ubicacion have unique values but All function add one record in the new created table with NULLS.

 

Thanks

Hi @kintela

Please try the following formula and check if it works fine.

 

Ubicacions= CALCULATETABLE(ALL(Proyectos[pais],Proyectos[estado/provincia],Proyectos[ubicacion]),Proyectos[pais]<>BLANK())

 

If you have any other problem, please feel free to ask.

Best Regards,
Angelia

 

Hi @v-huizhn-msft and @Birdjo

 

At the end with FILTER i have eliminated the blank records

 

captura.jpg

 

Thanks

Hi @v-huizhn-msft

 

 

With CALCULATETABLE I get the same first BLANK record

 

captura.jpg

Thanks

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.