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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
SelflearningBi
Helper III
Helper III

How to create relationship between two tables

Model NameProblemValue
ASize10
BSize5
CColor3
ENo Issue2
EColor1

 

Model NameValueQty
A1100
A230
C31
D103
C42


I would like to create a slicer that filter by Problem . How to create relationship between these two tables?
ex: 
A Problem Slicer, visualize in a table or chart show value/qty in model level and different problems

Now im facting an issue that problem doesnt filter table 2 only filter table 1

9 REPLIES 9
johnmelbourne
Helper V
Helper V

Hi,

This table I will call Problem

Model NameProblemValue
ASize10
BSize5
CColor3
ENo Issue2
EColor1

 

This table I will call Order.

Model NameValueQty
A1100
A230
C31
D103
C42

 

Create a reference to the Problem table and remove all but the model column.

Create a reference to the Order table and remove all but the model column.

Append the two new referenced tables together.

Remove the duplicates in Model column.

Join the new dimension table table to the two fact tables Order and Product. 

 

You can now slice by model.

 

A video explaining the process: https://www.youtube.com/watch?v=2iEapc7yE_g

 

Cheers

John

 

 

Hi Thanks for helping, is it possible to slice by problem?  
Actually I have lots of model, I would like to create a slicer that slice problem category and show the model/qty/value

Hi,

Sorry, I read your requirement incorrectly.

The original poster is partly correct, join both tables on Model. I assume you will have a many to many relationship. This will create a many to many realtionship but that will be ok. Make sure cross filter direction is set to both.

 

 

Then create a reference to the Problems table. 

Remove all columns except the problem column.
Remove duplicates.

Join the new Problem lookup (slicer / dimension) table to the other problem table on Problem. This will be a one-many relation. It will now slice both.

 

See images

 

1.jpg

3.jpg2.jpg

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

Hi thanks for showing the step, however, i found the result in value is come out incorrectly. I put model/ problem and value in a table but the value is not matching the raw data.

You need to relate both tables using the model column.

That will create a many to many relationship.

In the relationship, make sure the cross filter direction between orders and problems is set to BOTH.

 

Then create a reference to the problem table, remove all column except but the problem column, then make a relationship between problem in the slicer to problem in the Problems table.

Here is the video: https://www.youtube.com/watch?v=Vq9kXU6am4Q
Here is the pbix: URL https://tmpfiles.org/dl/932942/jointwotables.pbix
Filename jointwotables.pbix
Size 26.82 KB
Expires at 2023-02-13 10:59 UTC

 


Filename jointwotables.pbix
Size 26.82 KB
URL https://tmpfiles.org/dl/932942/jointwotables.pbix
Expires at 2023-02-13 10:59 UTC

 

@johnmelbourne Dude, you took the time to post 2 videos on YT with all the details on how to solve the problem. You are a legend!
Much respect. 👍👏

Thanks ! A comment 2 years after the work from a visitor is still valued.  Cheers. 😁

 

pratyashasamal
Memorable Member
Memorable Member

Hi @SelflearningBi  ,
I would suggest you to create a one to many relationship between Table 1 and Table 2 on basis of Model Name.
To Create relationship manually :-

  1. On the Modeling tab, select Manage relationships > New.

  2. In the Create relationship dialog box, in the first table drop-down list, select a table. Select the column you want to use in the relationship.

  3. In the second table drop-down list, select the other table you want in the relationship. Select the other column you want to use, and then select OK.

Please follow this link to read more :-
https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-create-and-manage-relationships

Hope this was helpful.
Thanks,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





@pratyashasamal  hi thanks for heping, but doesnt solve my issue..

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.