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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
joschultz
Advocate II
Advocate II

Creating relationships between two tables.

 

Is the purpose of creating relationships between two tables so that you can use them in the same visual?  I have a sales data table that is at a product level detail but I need to sum them in a table by category and then add the forecast number to that category.  I have the forcast data in a seperate table and I am trying to connect the two tables by category but it I get this error message. "You can't create a relationship between these two columns becuase one of the columns must have a unique values.

 

Any suggestions?

 

Thank you,

 

Joseph

 

1 ACCEPTED SOLUTION
Rémi
Resolver III
Resolver III

Hi,

 

Here a little example for understand how work a relationship :

Car sales :

You have a first table 'Sales', each row correspond to one sale, and you have many informations about that : the customer, the price, the car(s), etc ...

Then you have a table 'Customer' with the name/surname/full name/address/phone number/etc ...

 

You can create a relation from Sales to Customer if the Sales[Customer] column got the number (generally said Id) of the customer.

After that, you can display the sales by customer into Power BI without more steps.

 

 

View solution in original post

4 REPLIES 4
itchyeyeballs
Impactful Individual
Impactful Individual

If you need to link two sets of data which are at different granularities then you need a common lookup table rather than link directly between the two tables.

 

Have a look at these links

 

http://www.powerpivotpro.com/2012/01/salesbudget-integrating-data-of-different-grains/

http://www.daxpatterns.com/handling-different-granularities/

Anonymous
Not applicable

Is it possible to get an updated Solution?

The PowerPivot site is really interesting but the link to the full solution is broken.

 

Does anyone have an updated version:

http://www.cimaglobal.com/en-gb/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2012/Insig...

PowerBIGuy
Responsive Resident
Responsive Resident

Here's a video that may help.

 

https://www.youtube.com/watch?v=fVW4MCr0APA

Business Intelligence Architect / Consultant
Rémi
Resolver III
Resolver III

Hi,

 

Here a little example for understand how work a relationship :

Car sales :

You have a first table 'Sales', each row correspond to one sale, and you have many informations about that : the customer, the price, the car(s), etc ...

Then you have a table 'Customer' with the name/surname/full name/address/phone number/etc ...

 

You can create a relation from Sales to Customer if the Sales[Customer] column got the number (generally said Id) of the customer.

After that, you can display the sales by customer into Power BI without more steps.

 

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.