Forum Discussion

Korallis's avatar
Korallis
Regular Visitor
4 years ago

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

  • v-easonf-msft's avatar
    v-easonf-msft
    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