Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I am new to power-bi and am trying to make quite a complex model, could use some help!
I have a sales table with product and business unit data, and an expenses table with a business unit data.
I want to be able to allocate expenses by products based on the rate they constiture of the sales.
My relationships are as follows:
I created a new column in the sales table with the allocation, it works great:
Solved! Go to Solution.
Hi @Anonymous
Please check the column type of your Total Operating Income (Loss) column. Here you use sum function to calculate it, this column should be in number type.
I have test by a sample model, my dax code works well and it shouldn't be relationship or synatx error.
My sample is as below.
Year :
Expense3:
Sales:
AllocationRate = DIVIDE(
Sales[$K],
CALCULATE(SUM(Sales[$K]),FILTER(Sales,Sales[Business Unit]=EARLIER(Sales[Business Unit]))))ExpensesAllocation = ('Sales'[AllocationRate])*CALCULATE(SUM('Expenses3'[Total Operating Income (Loss)]))
Relationship:
You see my ExpensesAllocation column works well with the same relationship and show correct result. Please check whether this column is in number type in your model.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you!
Hi @Anonymous
Please check the column type of your Total Operating Income (Loss) column. Here you use sum function to calculate it, this column should be in number type.
I have test by a sample model, my dax code works well and it shouldn't be relationship or synatx error.
My sample is as below.
Year :
Expense3:
Sales:
AllocationRate = DIVIDE(
Sales[$K],
CALCULATE(SUM(Sales[$K]),FILTER(Sales,Sales[Business Unit]=EARLIER(Sales[Business Unit]))))ExpensesAllocation = ('Sales'[AllocationRate])*CALCULATE(SUM('Expenses3'[Total Operating Income (Loss)]))
Relationship:
You see my ExpensesAllocation column works well with the same relationship and show correct result. Please check whether this column is in number type in your model.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.