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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Framboosje1
Frequent Visitor

create relationship

Hi,

 

See picture below. what i want to create is a relationship between the merged table and table 1 so is can report on every column of table 1. CREATE RELATIONSHIP.JPG

1 ACCEPTED SOLUTION

Hi  @Framboosje1 ,

start with a Base Table, disable the load and create two references (State and City)

StateCity_Base.png

Disable the load for the references and dublicate the State/City Column.

Rename this Column as StateCity

StateCity_Column.png

Than Append this two tables as new query

StateCity_append.png

 

I updated the PBIX File

 

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

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

9 REPLIES 9

Hi @Framboosje1 ,

 

you have to create a column StateCity

 

DAX_StateCity.png

StateCity.png

Relation_StateCity.png

 

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

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


your solution looks good but can you share with me the pbix file.

Hi @Framboosje1 ,

 

here my quick & dirty PBIX File.

 

You should generate table 1 in Power Query. (with append queries)

 

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

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


thanks for the pbix but can you explain to me how to create in PowerQuery. 

thanks in advance

Hi  @Framboosje1 ,

start with a Base Table, disable the load and create two references (State and City)

StateCity_Base.png

Disable the load for the references and dublicate the State/City Column.

Rename this Column as StateCity

StateCity_Column.png

Than Append this two tables as new query

StateCity_append.png

 

I updated the PBIX File

 

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

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Last question 🙂

what should i do if i values in my merged table which are not unique to the Base Table. What should i do so i can create a many to one relationship.

 

example: instead of Ile de Paris - Paris i have Beieren - Munchen. what should i do(remove the not unique values or filter out something like that)

 

 

Can you explain it with more sample data?

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Sorry, but i don't understand the problem.

Why is Osaka not in the StateCity column of the merged table?

 

You know that you can edit the relationship?

Relation_Osaka.png

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

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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