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
wolfgang87
New Member

Connecting column headers to row information.

Hello everyone, 

I've two tables like below, where the on is an fact table with data from measuring with sensors and the second table is a dimension table with informations to the sensors. Imagine, that the fact table has over 3000 rows. My goal is to get a Matrix visual or writing DAX query to get a table like table 3, where i have calulated measure values from the fact table combined with further information from the dimenstion table.

 

wolfgang87_0-1731954164522.png

wolfgang87_1-1731954197771.pngwolfgang87_2-1731954211719.png

 

Is it possible with dax query or is there a better way?

Thx for any help.

 

 

1 ACCEPTED SOLUTION
uzuntasgokberk
Super User
Super User

Hello @wolfgang87 ,

You need to unpivot fact table first of all and the table shoud be like this column: Datetime, Attributes(shoud be m1,m2,m3) and values(should be m values). And make relationship between fact and dimension(id to atribute(1 to many)). And create a measure gives average which is AVERAGE(table[Values]).

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi all,thanks for the quick reply, I'll add more.

Hi @wolfgang87 ,

Please follow these steps:

1.Unpivot your fact table in Power Query.

vzhouwenmsft_0-1731997364936.png

vzhouwenmsft_1-1731997388651.png

2.Establishing relationships between tables

vzhouwenmsft_2-1731997542169.png

3.Final output

vzhouwenmsft_3-1731997802216.png

 

Best Regards,
Wenbin Zhou

danextian
Super User
Super User

Hi @wolfgang87 

As what @uzuntasgokberk  has suggested, you need to unpivot your fact table. Select datetime, right click and select Unpivot other columns which should create two new columns - one for the header called attribute and another one for the values.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
uzuntasgokberk
Super User
Super User

Hello @wolfgang87 ,

You need to unpivot fact table first of all and the table shoud be like this column: Datetime, Attributes(shoud be m1,m2,m3) and values(should be m values). And make relationship between fact and dimension(id to atribute(1 to many)). And create a measure gives average which is AVERAGE(table[Values]).

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

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!

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
Top Kudoed Authors