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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Korallis
Regular Visitor

Direct Query - 5 User ID columns mapping to a Employee Table

Hi guys.

I have a 2 tables. one for facts and figures and one for Employees

 

Facts and figures table

 

Total Value , U1 , U1%, U2, U2%, U3, U3%, U4, U4%, U5 , U5% 

 

Employee Table 

Emp ID (u1, u2 etc) , Job Title, Employee Name


then i have a metric that does the following (in Facts GP Table)
TotalGP =
VAR U1GP = 'Facts - GP'[Gross_Profit] * 'Facts - GP'[TimesheetCommissionSplit1Percent] /100
VAR U2GP = 'Facts - GP'[Gross_Profit] * 'Facts - GP'[TimesheetCommissionSplit2Percent] /100
VAR U3GP = 'Facts - GP'[Gross_Profit] * 'Facts - GP'[TimesheetCommissionSplit3Percent] /100
VAR U4GP = 'Facts - GP'[Gross_Profit] * 'Facts - GP'[TimesheetCommissionSplit4Percent] /100
VAR U5GP = 'Facts - GP'[Gross_Profit] * 'Facts - GP'[TimesheetCommissionSplit5Percent] /100
Return U1GP + U2GP + U3GP + U4GP + U5GP

 

The issue is whenever i use the TotalGP Metric against Employee Name its only pulling User 1. as the only active relationship is FactsGP.U1 = Employees.ID

the others are all Inactive. 
im unsure on how i can get what i need working i need total GP by Employee (no matter if the employee is in u1, u2, u3, u4 or u5, as Employee table contains ALL employees.
any help is much appreciated

1 REPLY 1
v-easonf-msft
Community Support
Community Support

Hi, @Korallis 

Not fully sure what you mean. Can you show your expected results with specific sample data?

A sample pbix file will better help us understand your problem and provide a solution.

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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