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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Transform Related columns using PowerQuery

In the current dataset I have I am encountering a problem that I can not wrap my head around.

 

I have a total of three datasets.

 

Dataset 1 has Column X containing values that are equal to Column A of Dataset 3. Dataset 2 has column Y  containing values that are equal to Colunmn B of Dataset 3. My goal is to relate Columns R,S,T in Dataset 1 and Columns P, Q, R in Dataset 2 to each other based on the information in Column A/B. However, using relationships in the Model creates a loop that does not work. How can I transform the dataset in PowerQuery such that I can plot Columns R,S,T vs Columns P, Q , R?

 

MWE of the datasets:

 

Dataset 1:

 

X    R S T

ab  2 3 4

xy   4 5 6

 

Dataset 2:

 

Y    P Q R

qw 4 2  2

ds  4 5  4

 

Dataset 3:

 

A   B

ab qw

xy ds

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I solved this by combining Query Dataset 3 with Dataset 2 and manually exchanging Column Y with column B. You could then append query dataset 1 and dataset 2 to reach a homogeneous dataset.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I solved this by combining Query Dataset 3 with Dataset 2 and manually exchanging Column Y with column B. You could then append query dataset 1 and dataset 2 to reach a homogeneous dataset.

v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Like this?

v-lionel-msft_0-1602660063772.png

v-lionel-msft_1-1602660078148.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Anonymous , Not very clear.

But merge dataset 3 and 1 (A- X) and then merge with 2 (Y- B)

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.