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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Mosijoon
Regular Visitor

Rephrasing the data

Hello everyone

Sorry, I couldn't paste the actual table. my data looks like this:

 

Mosijoon_0-1686858319503.png

 

and I'd like to rephrase it to this:

Mosijoon_1-1686858341907.png

I tried Unpivote in power query and managed to get the Employee and Serial right but for getting the values for Task1_hour and Task2_hour I tried merging the main table and the unpivoted table on Serial and Employee=Task1_employee but it gives me the redundant value for the employees that are common in those two columns. so I get this:

Mosijoon_2-1686858376205.png

 

Thanks in advance for your help.

2 REPLIES 2
amitchandak
Super User
Super User

@Mosijoon , Create a common dimension employee

 

Employee= distinct(union(distinct(Table1[Employee]),distinct(Table1[Task2_Employee])))

 

Then join with both employee and Task2_Employee , assume join with Task2_Employee is inactive

 

M1=  Sum(Table1[Task1_hour])

 

M2= calculate(Sum(Table1[Task1_hour]) , userelationship(Employee[Employee], Table1[Task2_Employee]) )

 

you can use these two measures with common employee dim and  other columns

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

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

Thank you for your reply. It works when you only want the total sum value but I still have a problem with slicers and tables. it only brings employees from the active relationship (to select in the slicer or as the first column in tables). is there a way around that? something like userelationship for slicers?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Users online (5,680)