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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
emre34
Regular Visitor

Allocation by Branches

Hi All,

i have a branch table and the columns are; Country, City, Branch

Also i have a expense table  and the columns are; Date, Branch, Expense type, Amount

Also i have a sales table  and the columns are; Date, Product, Branch,  Sales Amount

The problem is our finance guy make expenses from one dedicated branches in all the cities, so if we have 5 branches in the London he does all the expenses from London#1 Branch and London#3 Branch, If we have 3 branches in the Manchester, he does all the expenses from Manchester#2 branch. 

I want to make a sum off all the expenses by Cities, after i want to allocate them to branches by their sales amount.

How could i succeed it by DAX or by other methods?

Thank you in advance.

 

3 REPLIES 3
Anonymous
Not applicable

Hi,

Thanks for the solutions Kedar_Pande  and TomMartens , hello @emre34 ,did the solutions @Kedar_Pande  and @TomMartens  offered help you solve the problem, if they help, you can consider to accept them as solutions , or can  your provide some sample data and the output you want so that can providem more information for you.

 

Best Regards!

Yolo Zhu

Kedar_Pande
Super User
Super User

@emre34 

Summing Expenses by City

Total Expenses by City = 
CALCULATE(
SUM(ExpenseTable[Amount]),
ALLEXCEPT(BranchTable, BranchTable[City])
)

Calculate Sales Share for Each Branch

Sales Share by Branch = 
DIVIDE(
SUM(SalesTable[Sales Amount]),
CALCULATE(
SUM(SalesTable[Sales Amount]),
ALLEXCEPT(BranchTable, BranchTable[City])
)
)

Allocate Expenses to Branches by Sales Share

Allocated Expenses = 
[Sales Share by Branch] * [Total Expenses by City]

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

TomMartens
Super User
Super User

Hey @emre34 ,

 

this article explains how a value can be allocated to a different granularity: https://www.daxpatterns.com/budget/

 

If this does not help, create a pbix file that contains sample data but still reflects your semantic model (tables, relationships, calculated columns, and measures). Upload the file to OneDrive, Google Drive, or Dropbox and share the link). If you are using a spreadsheet to create the sample data instead of the manual input method share the spreadsheet as well.
Do not forget to describe the expected output based on the sample data you provide.

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.