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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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

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

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

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
Greg_Deckler
Community Champion
Community Champion

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!:
DAX For Humans

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors