I have 2 tables:
- sales contains: 1) employee 2) customer 3) sales amount
2) costs contains 1) customer 2) operation 3) expenses amount
descrition: salary data in costs table displayed as customer, which is equal to employee from sales table. And employees have only salary expenses.
customers from sales and costs are related and employee is not related to customer..
And I'm required to distribute all salary expenses from costs by sales customers.
So I need to have amount related to employee who soled goods to clients to display distributed expense by each sale line (in case if it would be displayed by goods the amount would also be distributed by goods).
what i require displayed in desired view column:
I have following formulas for 07,DirectSalesV:
07,DirectSalesV:=
CALCULATE('costs'[expenseAmount];
FILTER('client';'client'[client]=
CALCULATE(
VALUES('employee'[employee]);
FILTER('employee';'employee'[employee]='client'[client]))))
07,DirectSalesV:=
CALCULATE(
SUMx('costs';[expenseAmount]);
INTERSECT(
VALUES('costs'[client]);
VALUES('employee'[employee]));;
)
Please help to find out the solution