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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
vchauhan011
Frequent Visitor

Create a relationship between column "Months" and row "months"

Hello,

 

I have 2 data sets.  One has column called Months with all months listed with their respective hours and another data set has Months as row where each month's hours are listed below in the respective column. I want to create a relationship between the row with all months and columns Months. Would anyone know if it is possible to do in powerBI? if yes, how can I create this relationship? Please see te example below.

 

 

JanuaryFebruary
342557
543774
634347

 

Monthshours
January342
February557
January543
February774
January634
February347

 

 

 

 

 

 

Thank you very much in advance. I really appreciate your help.

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@vchauhan011 , Not sure I got it. But you need to use Transform data in Edit Query/Data transformation

Transpose: https://yodalearning.com/tutorials/power-query-helps-transposing-data/

https://radacad.com/pivot-and-unpivot-with-power-bi

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, insert an Index column in the first table.  RIght click on that first column's heading and select "Unpivot other columns".  You should now be able to build a Many to Many relationship between the 2 Tables.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, insert an Index column in the first table.  RIght click on that first column's heading and select "Unpivot other columns".  You should now be able to build a Many to Many relationship between the 2 Tables.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@vchauhan011 , Not sure I got it. But you need to use Transform data in Edit Query/Data transformation

Transpose: https://yodalearning.com/tutorials/power-query-helps-transposing-data/

https://radacad.com/pivot-and-unpivot-with-power-bi

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Super User
Super User

I do not know of a way to do that.

 

Why do you need both tables? I can't fathom a reason.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Thank you 

 

I have both tables because my data has two data points, Months and workstreams. The first table is the original data and the second one is the unpivoted table. I want to craete a relationship between these 2 tables so that all graphs are responsive to each other. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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