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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply

Calculate costs derived from another Department Category (operating vs corporate data)

I have a requirement to assign Corporate Expenses to the several Operating Departments according with the percentage of the Cost of Sales.

 

1. The percentage of Operating Cost of Sales per Department (% Operating Cost of Sales)

 

gerardotrejogcg_0-1642997059835.png

2. The Total Corporate Expenses (Corporate Amount)

gerardotrejogcg_3-1642997767128.png

3. The expected result is to multiply The Corporate Cost of Sales by the % of Expenses of each Operating Department.

The issue is that I'm not able to assing the Corporate cost on the Operating side. 

First row = 22,207,639.31 * 0.26%

....

Last row = 22,207,639.31 * 3.13%

 

gerardotrejogcg_4-1643000410205.png

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @gerardotrejogcg ;

Try it.

Measure = MAXX(ALL('Table'),[Corporate Expense])*[% Operating Cost of Sales]

The final output is shown below:

vyalanwumsft_0-1643264803363.png


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @gerardotrejogcg ;

Try it.

Measure = MAXX(ALL('Table'),[Corporate Expense])*[% Operating Cost of Sales]

The final output is shown below:

vyalanwumsft_0-1643264803363.png


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ValtteriN
Super User
Super User

Hi,

This kind of dax should do what you want:
[Allocated costs] = MAX(Table[% operating cost of sales])*CALCULATE(AVERAGE(Table[Corporate expenses]),ALL(Table), Table[Corporate expenses]<>BLANK())


I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I tried to adequate the provided dax with no luck.   

This is the expected result I want to reach.   Corporate Expense in gray means that currently I'm not able to assign that measure for "Operaciones" (Operating Department) since the result is calculated for "Corporativo" (Corporate Department) only.    

The result is limited to apply the Corporate Expense multiplied by % Operating Cost of Sales.

gerardotrejogcg_0-1643048411537.png

This is the sample data link

Operating Cost of Sales =
CALCULATE (
CALCULATE (
'Measure Slicers'[Measure Selection P&L],
ALLEXCEPT ( 'Accounts P&L', 'Accounts P&L'[KPI Name] ),
ALLEXCEPT( 'Dimension Sets', 'Dimension Sets'[Deparment Category] ),
FILTER ( 'Accounts P&L', 'Accounts P&L'[KPI Code] = "T200" ) --> Cost of Sales
),
FILTER ( 'Dimension Sets', 'Dimension Sets'[Deparment Category] = "Operaciones")
)

% Operating Cost of Sales =
DIVIDE ( [Amount P&L MXN], [Cost of Sales Operaciones], BLANK() )

Corporate Expense =
CALCULATE (
CALCULATE(
[Actual Expense Amount],
ALLEXCEPT ( 'Dimension Sets', 'Dimension Sets'[Deparment Category] )
),
FILTER ( 'Dimension Sets', 'Dimension Sets'[Deparment Category] = "Corporativo")
)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.