Forum Discussion
Overhead Expnese Allocation by Branch
- Anonymous2 years ago
Hi All,
Firstly, PurpleGate thank your for you solutions!
And emre34 for you question, I think there is a problem with your TotalSalesExcludingHQ , there is no good way to calculate the total value after the HQ.We simply remove 'Branch' [BRANCH_ID] to properly sum TotalSalesExcludingHQ.
MeasureAllocationOverheadCN5 = VAR currentcountryid = MAX(COUNTRY[COUNTRY_ID]) VAR Totaloverhead = CALCULATE( SUM(OVERHEAD_EXPENSES[OVERHEAD_EXPENSES]), BRANCH[BRANCH_ID] = 80 ) VAR TotalSalesExcludingHQ = CALCULATE( SUM(SALES[SALES_TEAM_A]) + SUM(SALES[SALES_TEAM_B]),Country[COUNTRY_ID]=5, REMOVEFILTERS('Branch'[BRANCH_ID]) ) VAR BranchSales = SUM(SALES[SALES_TEAM_A]) + SUM(SALES[SALES_TEAM_B]) VAR AllocationPerBranch = DIVIDE(Totaloverhead, TotalSalesExcludingHQ, 0) * BranchSales RETURN IF( currentcountryid=5, AllocationPerBranch, 0)If you still have questions, check out the pbix file I uploaded, I hope it helps!
Hope it helps!
Best regards,
Community Support Team_ Tom ShenIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi All,
Firstly, PurpleGate thank your for you solutions!
And emre34 for you question, I think there is a problem with your TotalSalesExcludingHQ , there is no good way to calculate the total value after the HQ.
We simply remove 'Branch' [BRANCH_ID] to properly sum TotalSalesExcludingHQ.
MeasureAllocationOverheadCN5 =
VAR currentcountryid = MAX(COUNTRY[COUNTRY_ID])
VAR Totaloverhead =
CALCULATE( SUM(OVERHEAD_EXPENSES[OVERHEAD_EXPENSES]), BRANCH[BRANCH_ID] = 80 )
VAR TotalSalesExcludingHQ =
CALCULATE(
SUM(SALES[SALES_TEAM_A]) + SUM(SALES[SALES_TEAM_B]),Country[COUNTRY_ID]=5,
REMOVEFILTERS('Branch'[BRANCH_ID])
)
VAR BranchSales =
SUM(SALES[SALES_TEAM_A]) + SUM(SALES[SALES_TEAM_B])
VAR AllocationPerBranch =
DIVIDE(Totaloverhead, TotalSalesExcludingHQ, 0) * BranchSales
RETURN
IF(
currentcountryid=5,
AllocationPerBranch,
0)
If you still have questions, check out the pbix file I uploaded, I hope it helps!
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.